Public report of saddam213/TensorStack, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 20:17 UTC · Survey ID cd_8fb2da295cf245ddb84a3259096376de
saddam213/TensorStack
Measured 17 November 2026, 20:17 UTC, at code version 2dcd2dc
Boundary Type-Coupling is not measured: Bounded contexts not declared.
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 44,697 lines of product code in 8 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 22.8
Findings by how serious they are
18 critical347 serious59 minor
4 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 20:17 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 ▸
60of 60 dimensions measured by tools.
407of 424 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
60dimensions across 6 lenses, read from 44,697 lines of product code in 8 projects.
saddam213/TensorStack falls short of our standard for a preview release because the project has no automated tests and we found no working pipeline that builds or tests changes to the code. It scores 38.8 out of 100 and is rated Weak, and three of its 18 critical findings are security problems.
Production Readiness, at 22.8, is the weakest lens and counts most in the score. The best first step is adding automated tests, worth about 14.9 points. Adding an automated build and test pipeline comes next, worth about 5.2 points. Raising Production Readiness to 62 would lift the score to about 52.1.
Two weaknesses in the code could be used by an attacker. One password or key is open to anyone who can read the repository, and six errors are caught and ignored, so failures can go unnoticed. Fixing the weaknesses the scanner points to, replacing the exposed password or key and handling or logging the ignored errors would close these risks. The four loops of parts of the code that depend on each other need breaking by moving the shared parts into a project of their own.
The product code is 44,697 lines, about €42,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 22.8 to 62, the lowest score rated Strong, the score would rise from 38.8 to about 52.1.
Code composition: what the lines of code are
Business logic 30%Supporting code 64%Generated by tools 6%
Rebuild cost: about €42,000 · Estimate
Cost to rebuild
€14,000 to €69,000, for 230 to 731 hours of work, about 0.3 person-years for one engineer
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 39. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 44,697 lines of product code
Comment lines
The estimate prices 37,495 lines. Comment lines count towards the size of 44,697 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
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 14.9 points · High effort · Code Coverage
2
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 5.2 points · Medium effort · CI/CD gates
3
Run what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
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 €42,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 22.8 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No automated tests finding(s) in Code Coverage. Of all the actions in this report, it raises the score most for the work it takes: about 14.9 points for high effort, because it clears the 1 Code Coverage findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
Architecture — 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.
51 modules, with 139 dependencies between them. 4 loops run through 13 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 11 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.
2 pairs of types, where a type in HuggingFace.Native.Python.lib.tensorstack.llm_utils uses a type in HuggingFace.Native.Python.lib.tensorstack.data_objects.
HuggingFace.Native.Python.lib.tensorstack.llm_utils uses HuggingFace.Native.Python.lib.tensorstack.data_objects, so a change to HuggingFace.Native.Python.lib.tensorstack.data_objects can break HuggingFace.Native.Python.lib.tensorstack.llm_utils, while a change to HuggingFace.Native.Python.lib.tensorstack.llm_utils can't break HuggingFace.Native.Python.lib.tensorstack.data_objects.
Position
Below the diagonal: HuggingFace.Native.Python.lib.tensorstack.llm_utils uses a module listed above it, which is the healthy direction.
HuggingFace.Native.Python.lib.tensorstack uses HuggingFace.Native.Python.lib.tensorstack.data_objects, so a change to HuggingFace.Native.Python.lib.tensorstack.data_objects can break HuggingFace.Native.Python.lib.tensorstack, while a change to HuggingFace.Native.Python.lib.tensorstack can't break HuggingFace.Native.Python.lib.tensorstack.data_objects.
Position
Below the diagonal: HuggingFace.Native.Python.lib.tensorstack uses a module listed above it, which is the healthy direction.
HuggingFace.Native.Python.lib.tensorstack uses HuggingFace.Native.Python.lib.tensorstack.llm_utils, so a change to HuggingFace.Native.Python.lib.tensorstack.llm_utils can break HuggingFace.Native.Python.lib.tensorstack, while a change to HuggingFace.Native.Python.lib.tensorstack can't break HuggingFace.Native.Python.lib.tensorstack.llm_utils.
Position
Below the diagonal: HuggingFace.Native.Python.lib.tensorstack uses a module listed above it, which is the healthy direction.
Media.Windows.Video uses Common.Tensor, so a change to Common.Tensor can break Media.Windows.Video, while a change to Media.Windows.Video can't break Common.Tensor.
Position
Below the diagonal: Media.Windows.Video uses a module listed above it, which is the healthy direction.
Media.Windows.Video uses Common.Video, so a change to Common.Video can break Media.Windows.Video, while a change to Media.Windows.Video can't break Common.Video.
Position
Below the diagonal: Media.Windows.Video uses a module listed above it, which is the healthy direction.
HuggingFace.Common uses Common.Pipeline, so a change to Common.Pipeline can break HuggingFace.Common, while a change to HuggingFace.Common can't break Common.Pipeline.
Position
Below the diagonal: HuggingFace.Common uses a module listed above it, which is the healthy direction.
HuggingFace.Common uses Common.Tensor, so a change to Common.Tensor can break HuggingFace.Common, while a change to HuggingFace.Common can't break Common.Tensor.
Position
Below the diagonal: HuggingFace.Common uses a module listed above it, which is the healthy direction.
HuggingFace.Common uses HuggingFace, so a change to HuggingFace can break HuggingFace.Common, while a change to HuggingFace.Common can't break HuggingFace.
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.
OnnxRuntime.LLM.Tokenizers uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Tokenizers, while a change to OnnxRuntime.LLM.Tokenizers can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Tokenizers uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Tokenizers uses Common, so a change to Common can break OnnxRuntime.LLM.Tokenizers, while a change to OnnxRuntime.LLM.Tokenizers can't break Common.
Position
Below the diagonal: OnnxRuntime.LLM.Tokenizers uses a module listed above it, which is the healthy direction.
StableDiffusionCpp.Common uses Common.Pipeline, so a change to Common.Pipeline can break StableDiffusionCpp.Common, while a change to StableDiffusionCpp.Common can't break Common.Pipeline.
Position
Below the diagonal: StableDiffusionCpp.Common uses a module listed above it, which is the healthy direction.
StableDiffusionCpp.Common uses Common.Tensor, so a change to Common.Tensor can break StableDiffusionCpp.Common, while a change to StableDiffusionCpp.Common can't break Common.Tensor.
Position
Below the diagonal: StableDiffusionCpp.Common uses a module listed above it, which is the healthy direction.
StableDiffusionCpp.Common uses Common, so a change to Common can break StableDiffusionCpp.Common, while a change to StableDiffusionCpp.Common can't break Common.
Position
Below the diagonal: StableDiffusionCpp.Common uses a module listed above it, which is the healthy direction.
18→31 StableDiffusionCpp.Common uses StableDiffusionCpppart of a loop✕
Connections
11 pairs of types, where a type in StableDiffusionCpp.Common uses a type in StableDiffusionCpp.
StableDiffusionCpp.Common uses StableDiffusionCpp, so a change to StableDiffusionCpp can break StableDiffusionCpp.Common, while a change to StableDiffusionCpp.Common can't break StableDiffusionCpp.
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.
WPF.Dialogs uses Media.Windows.Video, so a change to Media.Windows.Video can break WPF.Dialogs, while a change to WPF.Dialogs can't break Media.Windows.Video.
Position
Below the diagonal: WPF.Dialogs uses a module listed above it, which is the healthy direction.
19→28 WPF.Dialogs uses WPF.Servicespart of a loop✕
Connections
2 pairs of types, where a type in WPF.Dialogs uses a type in WPF.Services.
HuggingFace uses HuggingFace.Common, so a change to HuggingFace.Common can break HuggingFace, while a change to HuggingFace can't break HuggingFace.Common.
Position
Below the diagonal: HuggingFace uses a module listed above it, which is the healthy direction.
OnnxRuntime.Extract uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.Extract, while a change to OnnxRuntime.Extract can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.Extract uses a module listed above it, which is the healthy direction.
OnnxRuntime.Extract uses Common.Image, so a change to Common.Image can break OnnxRuntime.Extract, while a change to OnnxRuntime.Extract can't break Common.Image.
Position
Below the diagonal: OnnxRuntime.Extract uses a module listed above it, which is the healthy direction.
OnnxRuntime.Extract uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.Extract, while a change to OnnxRuntime.Extract can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.Extract uses a module listed above it, which is the healthy direction.
OnnxRuntime.Extract uses Common.Video, so a change to Common.Video can break OnnxRuntime.Extract, while a change to OnnxRuntime.Extract can't break Common.Video.
Position
Below the diagonal: OnnxRuntime.Extract uses a module listed above it, which is the healthy direction.
OnnxRuntime.Extract uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.Extract, while a change to OnnxRuntime.Extract can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.Extract uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Cache uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Cache, while a change to OnnxRuntime.LLM.Cache can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Cache uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Common uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.LLM.Common, while a change to OnnxRuntime.LLM.Common can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.LLM.Common uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Common uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Common, while a change to OnnxRuntime.LLM.Common can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Common uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Common uses Common.Vision, so a change to Common.Vision can break OnnxRuntime.LLM.Common, while a change to OnnxRuntime.LLM.Common can't break Common.Vision.
Position
Below the diagonal: OnnxRuntime.LLM.Common uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Common uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Common, while a change to OnnxRuntime.LLM.Common can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Common uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Common uses OnnxRuntime.LLM.Tokenizers, so a change to OnnxRuntime.LLM.Tokenizers can break OnnxRuntime.LLM.Common, while a change to OnnxRuntime.LLM.Common can't break OnnxRuntime.LLM.Tokenizers.
Position
Below the diagonal: OnnxRuntime.LLM.Common uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Supertonic uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.LLM.Pipelines.Supertonic, while a change to OnnxRuntime.LLM.Pipelines.Supertonic can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Supertonic uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Supertonic uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Pipelines.Supertonic, while a change to OnnxRuntime.LLM.Pipelines.Supertonic can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Supertonic uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Supertonic uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Pipelines.Supertonic, while a change to OnnxRuntime.LLM.Pipelines.Supertonic can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Supertonic uses a module listed above it, which is the healthy direction.
OnnxRuntime.Upscale uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.Upscale, while a change to OnnxRuntime.Upscale can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.Upscale uses a module listed above it, which is the healthy direction.
OnnxRuntime.Upscale uses Common.Image, so a change to Common.Image can break OnnxRuntime.Upscale, while a change to OnnxRuntime.Upscale can't break Common.Image.
Position
Below the diagonal: OnnxRuntime.Upscale uses a module listed above it, which is the healthy direction.
OnnxRuntime.Upscale uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.Upscale, while a change to OnnxRuntime.Upscale can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.Upscale uses a module listed above it, which is the healthy direction.
OnnxRuntime.Upscale uses Common.Video, so a change to Common.Video can break OnnxRuntime.Upscale, while a change to OnnxRuntime.Upscale can't break Common.Video.
Position
Below the diagonal: OnnxRuntime.Upscale uses a module listed above it, which is the healthy direction.
OnnxRuntime.Upscale uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.Upscale, while a change to OnnxRuntime.Upscale can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.Upscale uses a module listed above it, which is the healthy direction.
StableDiffusionCpp.Native uses Common.Tensor, so a change to Common.Tensor can break StableDiffusionCpp.Native, while a change to StableDiffusionCpp.Native can't break Common.Tensor.
Position
Below the diagonal: StableDiffusionCpp.Native uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in StableDiffusionCpp.Native uses a type in StableDiffusionCpp.Common. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
StableDiffusionCpp.Native uses StableDiffusionCpp.Common, so a change to StableDiffusionCpp.Common can break StableDiffusionCpp.Native, while a change to StableDiffusionCpp.Native can't break StableDiffusionCpp.Common.
Position
Below the diagonal: StableDiffusionCpp.Native uses a module listed above it, which is the healthy direction.
27→31 StableDiffusionCpp.Native uses StableDiffusionCpppart of a loop✕
Connections
15 pairs of types, where a type in StableDiffusionCpp.Native uses a type in StableDiffusionCpp.
StableDiffusionCpp.Native uses StableDiffusionCpp, so a change to StableDiffusionCpp can break StableDiffusionCpp.Native, while a change to StableDiffusionCpp.Native can't break StableDiffusionCpp.
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.
OnnxRuntime.LLM uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM, while a change to OnnxRuntime.LLM can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM uses OnnxRuntime.LLM.Cache, so a change to OnnxRuntime.LLM.Cache can break OnnxRuntime.LLM, while a change to OnnxRuntime.LLM can't break OnnxRuntime.LLM.Cache.
Position
Below the diagonal: OnnxRuntime.LLM uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Sampler uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Sampler, while a change to OnnxRuntime.LLM.Sampler can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Sampler uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Sampler uses OnnxRuntime.LLM.Common, so a change to OnnxRuntime.LLM.Common can break OnnxRuntime.LLM.Sampler, while a change to OnnxRuntime.LLM.Sampler can't break OnnxRuntime.LLM.Common.
Position
Below the diagonal: OnnxRuntime.LLM.Sampler uses a module listed above it, which is the healthy direction.
StableDiffusionCpp uses Common.Tensor, so a change to Common.Tensor can break StableDiffusionCpp, while a change to StableDiffusionCpp can't break Common.Tensor.
Position
Below the diagonal: StableDiffusionCpp uses a module listed above it, which is the healthy direction.
StableDiffusionCpp uses StableDiffusionCpp.Common, so a change to StableDiffusionCpp.Common can break StableDiffusionCpp, while a change to StableDiffusionCpp can't break StableDiffusionCpp.Common.
Position
Below the diagonal: StableDiffusionCpp uses a module listed above it, which is the healthy direction.
StableDiffusionCpp uses StableDiffusionCpp.Native, so a change to StableDiffusionCpp.Native can break StableDiffusionCpp, while a change to StableDiffusionCpp can't break StableDiffusionCpp.Native.
Position
Below the diagonal: StableDiffusionCpp uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Processing uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Processing, while a change to OnnxRuntime.LLM.Processing can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Processing uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Processing uses OnnxRuntime.LLM, so a change to OnnxRuntime.LLM can break OnnxRuntime.LLM.Processing, while a change to OnnxRuntime.LLM.Processing can't break OnnxRuntime.LLM.
Position
Below the diagonal: OnnxRuntime.LLM.Processing uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Pipelines, while a change to OnnxRuntime.LLM.Pipelines can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Pipelines, while a change to OnnxRuntime.LLM.Pipelines can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines uses OnnxRuntime.LLM.Tokenizers, so a change to OnnxRuntime.LLM.Tokenizers can break OnnxRuntime.LLM.Pipelines, while a change to OnnxRuntime.LLM.Pipelines can't break OnnxRuntime.LLM.Tokenizers.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines uses OnnxRuntime.LLM.Common, so a change to OnnxRuntime.LLM.Common can break OnnxRuntime.LLM.Pipelines, while a change to OnnxRuntime.LLM.Pipelines can't break OnnxRuntime.LLM.Common.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines uses OnnxRuntime.LLM, so a change to OnnxRuntime.LLM can break OnnxRuntime.LLM.Pipelines, while a change to OnnxRuntime.LLM.Pipelines can't break OnnxRuntime.LLM.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines uses OnnxRuntime.LLM.Sampler, so a change to OnnxRuntime.LLM.Sampler can break OnnxRuntime.LLM.Pipelines, while a change to OnnxRuntime.LLM.Pipelines can't break OnnxRuntime.LLM.Sampler.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines uses OnnxRuntime.LLM.Processing, so a change to OnnxRuntime.LLM.Processing can break OnnxRuntime.LLM.Pipelines, while a change to OnnxRuntime.LLM.Pipelines can't break OnnxRuntime.LLM.Processing.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses Common.Vision, so a change to Common.Vision can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break Common.Vision.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses Common, so a change to Common can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break Common.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses OnnxRuntime.LLM.Tokenizers, so a change to OnnxRuntime.LLM.Tokenizers can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break OnnxRuntime.LLM.Tokenizers.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses OnnxRuntime.LLM.Common, so a change to OnnxRuntime.LLM.Common can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break OnnxRuntime.LLM.Common.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses OnnxRuntime.LLM, so a change to OnnxRuntime.LLM can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break OnnxRuntime.LLM.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Florence uses OnnxRuntime.LLM.Pipelines, so a change to OnnxRuntime.LLM.Pipelines can break OnnxRuntime.LLM.Pipelines.Florence, while a change to OnnxRuntime.LLM.Pipelines.Florence can't break OnnxRuntime.LLM.Pipelines.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Florence uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Llama uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.LLM.Pipelines.Llama, while a change to OnnxRuntime.LLM.Pipelines.Llama can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Llama uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Llama uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Pipelines.Llama, while a change to OnnxRuntime.LLM.Pipelines.Llama can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Llama uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Llama uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Pipelines.Llama, while a change to OnnxRuntime.LLM.Pipelines.Llama can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Llama uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Llama uses OnnxRuntime.LLM.Common, so a change to OnnxRuntime.LLM.Common can break OnnxRuntime.LLM.Pipelines.Llama, while a change to OnnxRuntime.LLM.Pipelines.Llama can't break OnnxRuntime.LLM.Common.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Llama uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Llama uses OnnxRuntime.LLM, so a change to OnnxRuntime.LLM can break OnnxRuntime.LLM.Pipelines.Llama, while a change to OnnxRuntime.LLM.Pipelines.Llama can't break OnnxRuntime.LLM.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Llama uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Llama uses OnnxRuntime.LLM.Processing, so a change to OnnxRuntime.LLM.Processing can break OnnxRuntime.LLM.Pipelines.Llama, while a change to OnnxRuntime.LLM.Pipelines.Llama can't break OnnxRuntime.LLM.Processing.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Llama uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Llama uses OnnxRuntime.LLM.Pipelines, so a change to OnnxRuntime.LLM.Pipelines can break OnnxRuntime.LLM.Pipelines.Llama, while a change to OnnxRuntime.LLM.Pipelines.Llama can't break OnnxRuntime.LLM.Pipelines.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Llama uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Other uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.LLM.Pipelines.Other, while a change to OnnxRuntime.LLM.Pipelines.Other can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Other uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Other uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Pipelines.Other, while a change to OnnxRuntime.LLM.Pipelines.Other can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Other uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Other uses OnnxRuntime.LLM.Common, so a change to OnnxRuntime.LLM.Common can break OnnxRuntime.LLM.Pipelines.Other, while a change to OnnxRuntime.LLM.Pipelines.Other can't break OnnxRuntime.LLM.Common.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Other uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Other uses OnnxRuntime.LLM.Pipelines, so a change to OnnxRuntime.LLM.Pipelines can break OnnxRuntime.LLM.Pipelines.Other, while a change to OnnxRuntime.LLM.Pipelines.Other can't break OnnxRuntime.LLM.Pipelines.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Other uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Phi uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.LLM.Pipelines.Phi, while a change to OnnxRuntime.LLM.Pipelines.Phi can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Phi uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Phi uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Pipelines.Phi, while a change to OnnxRuntime.LLM.Pipelines.Phi can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Phi uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Phi uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Pipelines.Phi, while a change to OnnxRuntime.LLM.Pipelines.Phi can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Phi uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Phi uses OnnxRuntime.LLM.Common, so a change to OnnxRuntime.LLM.Common can break OnnxRuntime.LLM.Pipelines.Phi, while a change to OnnxRuntime.LLM.Pipelines.Phi can't break OnnxRuntime.LLM.Common.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Phi uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Phi uses OnnxRuntime.LLM, so a change to OnnxRuntime.LLM can break OnnxRuntime.LLM.Pipelines.Phi, while a change to OnnxRuntime.LLM.Pipelines.Phi can't break OnnxRuntime.LLM.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Phi uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Phi uses OnnxRuntime.LLM.Processing, so a change to OnnxRuntime.LLM.Processing can break OnnxRuntime.LLM.Pipelines.Phi, while a change to OnnxRuntime.LLM.Pipelines.Phi can't break OnnxRuntime.LLM.Processing.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Phi uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Phi uses OnnxRuntime.LLM.Pipelines, so a change to OnnxRuntime.LLM.Pipelines can break OnnxRuntime.LLM.Pipelines.Phi, while a change to OnnxRuntime.LLM.Pipelines.Phi can't break OnnxRuntime.LLM.Pipelines.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Phi uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Whisper uses Common.Pipeline, so a change to Common.Pipeline can break OnnxRuntime.LLM.Pipelines.Whisper, while a change to OnnxRuntime.LLM.Pipelines.Whisper can't break Common.Pipeline.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Whisper uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Whisper uses Common.Tensor, so a change to Common.Tensor can break OnnxRuntime.LLM.Pipelines.Whisper, while a change to OnnxRuntime.LLM.Pipelines.Whisper can't break Common.Tensor.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Whisper uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Whisper uses OnnxRuntime, so a change to OnnxRuntime can break OnnxRuntime.LLM.Pipelines.Whisper, while a change to OnnxRuntime.LLM.Pipelines.Whisper can't break OnnxRuntime.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Whisper uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Whisper uses OnnxRuntime.LLM.Common, so a change to OnnxRuntime.LLM.Common can break OnnxRuntime.LLM.Pipelines.Whisper, while a change to OnnxRuntime.LLM.Pipelines.Whisper can't break OnnxRuntime.LLM.Common.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Whisper uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Whisper uses OnnxRuntime.LLM, so a change to OnnxRuntime.LLM can break OnnxRuntime.LLM.Pipelines.Whisper, while a change to OnnxRuntime.LLM.Pipelines.Whisper can't break OnnxRuntime.LLM.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Whisper uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Whisper uses OnnxRuntime.LLM.Processing, so a change to OnnxRuntime.LLM.Processing can break OnnxRuntime.LLM.Pipelines.Whisper, while a change to OnnxRuntime.LLM.Pipelines.Whisper can't break OnnxRuntime.LLM.Processing.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Whisper uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Whisper uses OnnxRuntime.LLM.Pipelines, so a change to OnnxRuntime.LLM.Pipelines can break OnnxRuntime.LLM.Pipelines.Whisper, while a change to OnnxRuntime.LLM.Pipelines.Whisper can't break OnnxRuntime.LLM.Pipelines.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Whisper uses a module listed above it, which is the healthy direction.
OnnxRuntime.LLM.Pipelines.Whisper uses OnnxRuntime.LLM.Pipelines.Florence, so a change to OnnxRuntime.LLM.Pipelines.Florence can break OnnxRuntime.LLM.Pipelines.Whisper, while a change to OnnxRuntime.LLM.Pipelines.Whisper can't break OnnxRuntime.LLM.Pipelines.Florence.
Position
Below the diagonal: OnnxRuntime.LLM.Pipelines.Whisper uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 52.5 · Adequate · gated by X5 ·
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
A07:2025 — Authentication Failures
2
High / Critical
A05:2025 — Injection
2
High / Critical
Roadmap
Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; Add a CI workflow that builds and runs the test suite on every push/PR; Run what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No automated tests finding(s) in Code Coverage.
Run what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt — start with TensorStack.HuggingFace.csproj (2), TensorStack.OnnxRuntime.csproj, TensorStack.OnnxRuntime.LLM.csproj.
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 — 18
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 — 347
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 — 59
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 4
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 60 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 — 60 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, 407 of 424 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.
D4 Code Duplication — 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 75 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .py (12,856 lines, 29% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 459 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
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 C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'TensorStack.WPF/TensorStack.WPF.csproj' with message: The type reference cannot find a public type named 'VideoFrame'. Line 242 Position 94.
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 23 deducted marker(s) and the 0.3/KLoC density on this row were taken over this repository's .NET projects ALONE: .py (12,856 lines, 29% of production source) went unread, because every marker collector on this path is reached through a C# workspace. D17's marker collectors need a compiler we do not have for that language, so none of its nine marker kinds were read there. 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. 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. 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.
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 — 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. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
D23 Boundary Type-Coupling — 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. Large codebase (31,752 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — 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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Tracing effort is measured over resolved call sites, and all 689 sampled here came from .cs files. This repository's .py source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
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. `TensorStack.HuggingFace/HuggingFacePipeline.cs`, `TensorStack.WPF/Services/MarkdownConverter.cs` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
IC1 Incompleteness & stubs — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
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.
PF3 Async & latency hygiene — 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. 192 further occurrence(s) are not listed individually; the score already reflects all 232.
X1 Async correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X12 Unreachable branch — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X13 Undrained process stream — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X15 Unvalidated length from an untrusted reader — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X16 Unfloored truncation loop — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X18 Disposal-pattern correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X19 Unrestored process-global state — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X2 Cancellation propagation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X2 Cancellation propagation — 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. 81 further occurrence(s) are not listed individually; the score already reflects all 121.
X22 Contradicted release guard — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X24 Document value interpolated into markup unescaped — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X26 Unsynchronised callback handoff — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X27 Collection changed while being enumerated — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X28 Index access outside its own emptiness guard — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X29 Per-element action decided by a fixed element — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
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 REDACTED Scanning: REDACTED 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.
D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
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.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
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.
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.
4 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was quantization.pretrained_config at 24. 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 MarkdownElement.GetContentType at 25 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: TensorStack.WPF/Controls/MarkdownElement.xaml.cs (MarkdownElement.GetContentType at 25), TensorStack.StableDiffusionCpp/Native/NativeApiEnums.cs (NativeApiEnums.ToUnmanaged at 23), TensorStack.OnnxRuntime.LLM/Pipelines/Florence/PreProcessor.cs (PreProcessor.ProcessPrompt at 17), TensorStack.OnnxRuntime.LLM/Pipelines/Florence/PostProcessor.cs (PostProcessor.GetCoordinateType at 16). 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.
Bring the 4 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with quantization.pretrained_config (cyclomatic 24), utils.get_model_config (cyclomatic 23), TensorExtensions.ConcatenateAxis1 (cyclomatic 22). — 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 4 together lifts Cyclomatic Complexity from 9.2 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 15 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 TensorExtensions.ConcatenateAxis1 (cognitive 60), TagBlockRenderer.Write (cognitive 32). — 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 6.9 to about 7.7/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.3 / 10Stronggated by 5 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 4 TooManyMethods finding(s) in God Classes — start with VideoStreamElement.xaml.cs, ImageEditElement.xaml.cs, MarkdownElement.xaml.cs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 FileTooLong finding(s) in God Classes — start with utils.py. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
75 duplicated block group(s) detected. 11.7 % of the production lines (3,719 of 31,752) are in a reported copy. A further 57 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .py (29% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count.
+ 73 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with GenerateImageOptions.cs, HeliosOptions.cs, EulerAncestralOptions.cs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 Edited copy of a member (14 corresponding lines) finding(s) in Code Duplication — start with AudioStreamElement.xaml.cs (2), CoordinateScaler.cs, AudioManager.cs. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 5 Edited copy of a member (11 corresponding lines) finding(s) in Code Duplication — start with IntConverter.cs (4), utils.py. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
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 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with StableDiffusionContext.cs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage0.0 / 10Critical✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
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.
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 121 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 18 direct `PackageReference`(s), and 103 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
23 deducted debt markers + unmeasured dead symbols across 31752 LoC in the .NET projects (0.3/KLoC) → score 9.3. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .py (29% of production source) was not read, and carries at least 0 uncounted task marker(s) in 0 file(s).
Resolve the 6 EmptyCatchBlock finding(s) in Explicit Debt — start with Extensions.cs, REDACTED, SupertonicProcessor.cs. — One of this dimension's main actionable groups (6 issue-level).
Resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt — start with TensorStack.HuggingFace.csproj (2), TensorStack.OnnxRuntime.csproj, TensorStack.OnnxRuntime.LLM.csproj. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 10 TodoComment finding(s) in Explicit Debt — start with KVCacheDecoder.cs (2), KVCacheEncoderDecoder.cs (2), SupertonicProcessor.cs (2). — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the solution is laid out in a sensible, conventional structure.
Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.
8 projects, 293 source files, 31752 hand-written lines of code (31752 production / 0 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), plus 1492 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 10 inter-project edges.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 2 documentation facets pass in full; short on: F2 example. 14 document(s) read across 9 unit(s).
Documentation: no build, run or usage example · ×6README.md:1
What to do
Resolve the 6 Documentation finding(s) in Documentation Quality — start with README.md (6). — One of this dimension's main actionable groups (6 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
No ADRs foundTensorStack.WPF/TensorStack.WPF.csproj:3
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with TensorStack.WPF.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: 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.
doc comments repeat the names · ×8TensorStack.Common/Audio/AudioInputBase.cs:14
What to do
Resolve the 2 redundant comment finding(s) in Comment Value — start with DecoderPipeline.cs, Extensions.cs. — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 8 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionTensorStack.WPF/TensorStack.WPF.csproj:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with TensorStack.WPF.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
75 % of calls cross a namespace and 3 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: medium — clean/modular boundaries expected. Measured over the .cs source only — this repository's .py was not sampled for call sites, so this score covers part of the tree, not all of it.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED 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.
1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. semgrep hit a parse error in 2 file(s) — `TensorStack.HuggingFace/HuggingFacePipeline.cs` (line 124), `TensorStack.WPF/Services/MarkdownConverter.cs` (line 102, line 128, line 553) — 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.
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 125 of the 287 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 1 Change coupling finding(s) in Change Coupling — start with HuggingFacePipeline.cs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Other · Architecture — 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.
`NavigationService` is a singleton (one shared instance) but mutates instance state outside any lock (_host, _views; e.g. `_host` at line 29). — TensorStack.WPF/Services/NavigationService.cs:12
`LocalizationService` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_cultureInfo; e.g. `_cultureInfo` at line 47). — TensorStack.WPF/Services/LocalizationService.cs:11
`MediaManager` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (FFMpegPath, FFProbePath, DirectoryTemp; e.g. `FFMpegPath` at line 38). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — REDACTED:11
`DeviceManager` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_deviceProvider, _environmentOptions, _environment, _devices; e.g. `_deviceProvider` at line 51). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — TensorStack.OnnxRuntime/DeviceManager.cs:11
`Provider` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_isInitialized; e.g. `_isInitialized` at line 24). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — TensorStack.OnnxRuntime/Providers/Provider.cs:10
`ThemeDictionary` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_theme; e.g. `_theme` at line 30). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — TensorStack.WPF/ThemeDictionary.cs:12
`NativeApi` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_libraryHandle, _backendInfo; e.g. `_libraryHandle` at line 38). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — TensorStack.StableDiffusionCpp/Native/NativeApi.cs:10
What to do
Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
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.
The namespaces TensorStack.Common ↔ TensorStack.Common.Image ↔ TensorStack.Common.Tensor ↔ TensorStack.Common.Vision depend on each other. The lightest dependency in the cycle is TensorStack.Common → TensorStack.Common.Vision (TensorStack.Common.TensorExtensions → TensorStack.Common.Vision.CoordinateBox, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — TensorStack.Common/Extensions/TensorExtensions.cs:9
The namespaces TensorStack.HuggingFace ↔ TensorStack.HuggingFace.Common depend on each other. The lightest dependency in the cycle is TensorStack.HuggingFace.Common → TensorStack.HuggingFace (TensorStack.HuggingFace.Common.ConversationMessage → TensorStack.HuggingFace.ConversationRole, 7 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — TensorStack.HuggingFace/Common/ConversationMessage.cs:3
The namespaces TensorStack.StableDiffusionCpp ↔ TensorStack.StableDiffusionCpp.Common ↔ TensorStack.StableDiffusionCpp.Native depend on each other. The lightest dependency in the cycle is TensorStack.StableDiffusionCpp → TensorStack.StableDiffusionCpp.Native (TensorStack.StableDiffusionCpp.StableDiffusionPipeline → TensorStack.StableDiffusionCpp.Native.StableDiffusionContext, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — TensorStack.StableDiffusionCpp/StableDiffusionPipeline.cs:9
The namespaces TensorStack.WPF ↔ TensorStack.WPF.Controls ↔ TensorStack.WPF.Dialogs ↔ TensorStack.WPF.Services depend on each other. The lightest dependency in the cycle is TensorStack.WPF → TensorStack.WPF.Services (TensorStack.WPF.Common → TensorStack.WPF.Services.DownloadProgress, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — TensorStack.WPF/Common.cs:12
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether 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 interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Other · 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.
A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×27) — TensorStack.Common/Common/MapCollection.cs:107, TensorStack.WPF/Converters/BoolConverters.cs:36, TensorStack.WPF/Converters/BoolConverters.cs:51, …
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`CopyTo` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — TensorStack.Common/Common/MapCollection.cs:107
The branch `if (axis != 0)` throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported. (×3) — TensorStack.Common/Extensions/TensorExtensions.cs:470, TensorStack.Common/Extensions/TensorExtensions.cs:540, TensorStack.Common/Extensions/TensorExtensions.cs:565
The catch-all arm (reached by `String`, `Bool`, `Complex64`, `Complex128` and 1 more) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported. (×2) — TensorStack.OnnxRuntime/OrtExtensions.cs:265, TensorStack.OnnxRuntime/OrtExtensions.cs:326
`StopAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:569
A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×4) — TensorStack.WPF/Converters/IntConverter.cs:30, TensorStack.WPF/Converters/IntConverter.cs:33, TensorStack.WPF/Dialogs/LoadVideoDialog.xaml.cs:317, …
What to do
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
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.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record 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.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
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.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 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.
`TensorStack.Common.Common.FileQueue` (TensorStack.Common/Common/FileQueue.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `TensorStack.HuggingFace`, `TensorStack.Media`, `TensorStack.OnnxRuntime`, `TensorStack.OnnxRuntime.LLM`, `TensorStack.OnnxRuntime.Vision`, `TensorStack.StableDiffusionCpp`, `TensorStack.WPF`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — TensorStack.Common/Common/FileQueue.cs:9
`TensorStack.Media.Audio.AudioManager` (TensorStack.Media/Audio/AudioManager.cs:18) is public, and the library's own code uses it, but no other project in this repository uses it (read: `TensorStack.StableDiffusionCpp`, `TensorStack.WPF`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — TensorStack.Media/Audio/AudioManager.cs:18
`TensorStack.OnnxRuntime.ParameterCollection` (TensorStack.OnnxRuntime/ParameterCollection.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `TensorStack.OnnxRuntime.LLM`, `TensorStack.OnnxRuntime.Vision`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such. — TensorStack.OnnxRuntime/ParameterCollection.cs:9
What to do
Make `TensorStack.Common.Common.FileQueue` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `TensorStack.Media.Audio.AudioManager` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Make `TensorStack.OnnxRuntime.ParameterCollection` internal (C#: `internal`, with `[InternalsVisibleTo]` for the sibling assemblies and tests that need them): only the library itself uses it and nothing on its public API exposes it, so hiding it costs consumers nothing and lets it change freely.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
`TensorStack.Common/TensorStack.Common.csproj` 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`. — TensorStack.Common/TensorStack.Common.csproj:8
What to do
Run what this repository's stack ships: CodeQL's csharp pack, or a .NET security analyzer package — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out. (×2) — TensorStack.HuggingFace/HuggingFaceBackend.cs:226, TensorStack.StableDiffusionCpp/StableDiffusionBackend.cs:193
What to do
Give every outbound call a bound the caller can rely on: set an explicit `HttpClient.Timeout` (or pass a `CancellationToken` from a `CancellationTokenSource` with a deadline) and flow the caller's own `CancellationToken` through, so a slow endpoint fails fast instead of hanging.
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.
1 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
`.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one). — TensorStack.Media/Video/VideoInput.cs:45
Only 1/230 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
`await LoadAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×3) — TensorStack.Common/Common/Backend.cs:89, TensorStack.Common/Common/Backend.cs:92, TensorStack.Common/Common/Backend.cs:96
`await SetupAsync(BackendStatus.Update)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Common/Common/Backend.cs:92
`await SetupAsync(BackendStatus.Create)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Common/Common/Backend.cs:96
`await _signal.WaitAsync(_cts.Token)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Common/Common/FileQueue.cs:35
`await Task.Delay(RetryDelayMs)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Common/Common/FileQueue.cs:45
`await File.WriteAllTextAsync(filename, Text)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Common/Common/TextInput.cs:41
`await File.ReadAllTextAsync(filename, encoding, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Common/Common/TextInput.cs:47
`await cancellationTokenSource.CancelAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Common/Extensions/Extensions.cs:189
`await Extensions.SaveAsync(this, filename, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioInput.cs:71
`await AudioManager.LoadTensorAsync(filename, audioCodec, sampleRate, channels, canc...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioInput.cs:82
`await AudioManager.LoadTensorAsync(SourceFile, audioCodec, sampleRate, channels, ca...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioInputStream.cs:38
`await CreateAsync(newFilename)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×2) — TensorStack.Media/Audio/AudioInputStream.cs:53, TensorStack.Media/Audio/AudioInputStream.cs:68
`await AudioManager.LoadInfoAsync(filename)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioInputStream.cs:78
`await ReadInfoAsync(filename)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:36
`await ReadAudioAsync(filename, audioCodec, sampleRate, channels, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:63
`await MuxAudioAsync(targetVideoFile, sourceVideoFile, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:97
`await ffmpeg.StandardOutput.BaseStream.CopyToAsync(audioStream, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:138
`await ffmpeg.WaitForExitAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×3) — TensorStack.Media/Audio/AudioManager.cs:139, TensorStack.Media/Audio/AudioManager.cs:191, TensorStack.Media/Audio/AudioManager.cs:237
`await audioStream.WriteAsync(audioBuffer, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:188
`await audioStream.FlushAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:189
`await reader.ReadToEndAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:293
`await metadataReader.WaitForExitAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:295
`await ExtractAudioAsync(audioTimeline, audioSegment)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:394
`await JoinSegmentsAsync(audioTimeline, audioOutput)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/AudioManager.cs:398
`await ExecuteFFMPEGAsync(arguments)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. (×3) — TensorStack.Media/Audio/AudioManager.cs:443, TensorStack.Media/Audio/AudioManager.cs:473, TensorStack.Media/Audio/AudioManager.cs:489
`await AudioManager.WriteAudioAsync(filename, audioTensor, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Audio/Extensions.cs:31
`await File.WriteAllBytesAsync(filename, data.ToArray(), cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — TensorStack.Media/Image/ImageInput.cs:101
`await WriteFramesAsync(videoSequence.Frames, videoSequence.FrameRate, filename, enc...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — REDACTED:59
`await WriteAudioAsync(videoSequence.Audio, filename, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — REDACTED:62
`await using … = frameWriter.StandardInput.BaseStream` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`. — REDACTED:92
What to do
Make the call chain async end-to-end and await it — never block on a Task with .Wait()/.GetAwaiter().GetResult().
In library code, append .ConfigureAwait(false) to every await (or set <ConfigureAwait>false</ConfigureAwait> / use the analyzer CA2007) so the library never captures the host's context.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process. — TensorStack.Media/Video/VideoInput.cs:45
`async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained. (×19) — TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:318, TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:422, TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:435, …
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
`headerLen` is read from the stream being parsed at line 143 (`ReadUInt16`), then read in bulk from that same stream at line 144 — and nowhere in this method is `headerLen` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). A file the caller did not write therefore chooses the size directly: a value near `int.MaxValue` allocates until the process dies, and a value that overflows the cast to `int` goes negative and throws out of a parser whose failure path was written for malformed input, not for hostile input. Bound `headerLen` against the bytes actually remaining in the stream before spending it. — TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/PreProcessor.cs:144
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`Tensor` declares a finalizer (line 239), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization. — TensorStack.Common/Tensor/Tensor.cs:239
`result` is a `Tensor`, which implements `IDisposable`, and it is created here (line 371). Every use of it in `CreateAudioTensor` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var result = …;`), which releases it at the end of the scope on every path including a throw. — TensorStack.Media/Audio/AudioManager.cs:371
`tensor` is a `Tensor`, which implements `IDisposable`, and it is created here (line 341). Every use of it in `CreateTensor` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var tensor = …;`), which releases it at the end of the scope on every path including a throw. — TensorStack.OnnxRuntime.Vision/Pipelines/PosePipeline.cs:341
`_tokenizer` is never created by `DecoderPipeline` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 432). Its declared type `ITokenizer` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed. — TensorStack.OnnxRuntime.LLM/Pipelines/DecoderPipeline.cs:432
`ones` is a `Tensor`, which implements `IDisposable`, and it is created here (line 234). Every use of it in `RunVisionEncoderAsync` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var ones = …;`), which releases it at the end of the scope on every path including a throw. — TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:234
`audioTensor` is a `Tensor`, which implements `IDisposable`, and it is created here (line 110). Every use of it in `RunAsync` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var audioTensor = …;`), which releases it at the end of the scope on every path including a throw. — TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicPipeline.cs:110
`_cancellationTokenSource` is a `CancellationTokenSource` this type creates itself, and here (line 693) a new instance is written over it — but `LoadVideoFramesAsync` itself reads through `_cancellationTokenSource` before replacing it, so it expects an instance to be there, and nothing earlier in `LoadVideoFramesAsync` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_cancellationTokenSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:693
`_cancellationTokenSource` is a `CancellationTokenSource` this type creates itself, and here (line 742) a new instance is written over it — but `GetVideoFrameAsync` itself reads through `_cancellationTokenSource` before replacing it, so it expects an instance to be there, and nothing earlier in `GetVideoFrameAsync` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_cancellationTokenSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back. — TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:742
`folderBrowserDialog` is a `FolderBrowserDialog`, which implements `IDisposable`, and it is created here (line 47). Every use of it in `OpenFolderAsync` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var folderBrowserDialog = …;`), which releases it at the end of the scope on every path including a throw. — TensorStack.WPF/Services/DialogService.cs:47
`managedTensor` is a `Tensor`, which implements `IDisposable`, and it is created here (line 691). Every use of it in `ToManaged` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var managedTensor = …;`), which releases it at the end of the scope on every path including a throw. — TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:691
`managedImage` is a `ImageInput`, which implements `IDisposable`, and it is created here (line 421). Every use of it in `OnPromptImageCallback` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var managedImage = …;`), which releases it at the end of the scope on every path including a throw. — TensorStack.StableDiffusionCpp/Native/StableDiffusionContext.cs:421
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 93/210 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
No CancellationToken parameter — this work can't be stopped early once started. (×38) — TensorStack.Common/Common/Backend.cs:85, TensorStack.Common/Common/TextInput.cs:39, TensorStack.Media/Audio/AudioInputStream.cs:47, …
No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. — TensorStack.Common/Common/FileQueue.cs:31
What to do
Thread a CancellationToken through async methods so work stops promptly on cancellation.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.
The guard on line 42 rejects `filePath` and line 43 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(filePath)` is true of a value that is NOT null: it is satisfied by an EMPTY `filePath`, and on that path `filePath` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition. — TensorStack.WPF/Image/ImageService.cs:43
What to do
Each finding names the throw and the test in its own condition that is true of a NON-null value. Confirm from the two, then throw the exception that describes what was actually wrong: `ArgumentException` for a value that arrived empty, or the .NET 8 helpers that spell the whole guard in one line and pick the type for you — `ArgumentException.ThrowIfNullOrEmpty(s)` / `ThrowIfNullOrWhiteSpace(s)` for strings, `ArgumentNullException.ThrowIfNull(x)` followed by `ArgumentOutOfRangeException.ThrowIfZero(x.Count)` for a collection. Splitting the two conditions is usually clearer than picking one exception for both: they are different failures and the caller may want to handle them differently.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`. In Rust, where a guard or permit releases when it is dropped, whether a release written BY HAND — `add_permits` after a forgotten permit, `force_unlock` after a leaked guard, a raw lock's `unlock` — matches the state the function's own acquisitions put the primitive in: not after a try or timed acquire whose failure does not leave, not from a cleanup set up before an acquire that can fail, not skipped by a `?`, `return`, `break` or `continue`, and not on top of a guard that still releases itself.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.2 / 10Adequate✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`html` is text this program did not author, and it is written into the text of an element through `insertAdjacentHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — TensorStack.WPF/Controls/MarkdownElement.js:72
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×6) — TensorStack.Common/Extensions/Extensions.cs:174, REDACTED:71, TensorStack.OnnxRuntime/DeviceManager.cs:136, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.
Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.
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.
0/8 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
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 — 4 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.
SC1 Supply-chain hygiene — 8 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X6 Hand-rolled structured-format parsing — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 14 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 51 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC2 Forms & labels — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC3 Page structure — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC4 Keyboard semantics — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC5 ARIA correctness — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AC6 Visual & motion safety — No user-facing web UI (the repo is a library/CLI/worker/headless service) — accessibility is not applicable.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — 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.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
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.
D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
D16 Bus Factor — single-contributor repository — bus factor is not applicable
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 5 candidate(s) found and not reported.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D25 ADR Conformance — no ADRs to check
D30 Dependency Vulnerabilities — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (13 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
P12 CI test-gate honesty — no CI workflow found
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found by the two searches this check runs — a BenchmarkDotNet package reference in any project file (loaded, or on disk), and a script whose name contains `benchmark` that this repository's CI runs. Neither can see a suite in another ecosystem's idiom, so this is not a verdict that the repository has none. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted, and nothing is asked of a repository that has none.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
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
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
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
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
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
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
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
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 TensorStack.Common/Extensions/Extensions.cs:174— 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.
EmptyCatchBlock REDACTED:71— 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.
EmptyCatchBlock TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicProcessor.cs:359— 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.
EmptyCatchBlock TensorStack.OnnxRuntime/DeviceManager.cs:136— 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.
EmptyCatchBlock TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:747— 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.
EmptyCatchBlock TensorStack.WPF/Dialogs/LoadVideoDialog.xaml.cs:280— 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.
Namespace dependency cycle TensorStack.Common/Extensions/TensorExtensions.cs:9— The namespaces TensorStack.Common ↔ TensorStack.Common.Image ↔ TensorStack.Common.Tensor ↔ TensorStack.Common.Vision depend on each other. The lightest dependency in the cycle is TensorStack.Common → TensorStack.Common.Vision (TensorStack.Common.TensorExtensions → TensorStack.Common.Vision.CoordinateBox, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle TensorStack.HuggingFace/Common/ConversationMessage.cs:3— The namespaces TensorStack.HuggingFace ↔ TensorStack.HuggingFace.Common depend on each other. The lightest dependency in the cycle is TensorStack.HuggingFace.Common → TensorStack.HuggingFace (TensorStack.HuggingFace.Common.ConversationMessage → TensorStack.HuggingFace.ConversationRole, 7 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle TensorStack.StableDiffusionCpp/StableDiffusionPipeline.cs:9— The namespaces TensorStack.StableDiffusionCpp ↔ TensorStack.StableDiffusionCpp.Common ↔ TensorStack.StableDiffusionCpp.Native depend on each other. The lightest dependency in the cycle is TensorStack.StableDiffusionCpp → TensorStack.StableDiffusionCpp.Native (TensorStack.StableDiffusionCpp.StableDiffusionPipeline → TensorStack.StableDiffusionCpp.Native.StableDiffusionContext, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle TensorStack.WPF/Common.cs:12— The namespaces TensorStack.WPF ↔ TensorStack.WPF.Controls ↔ TensorStack.WPF.Dialogs ↔ TensorStack.WPF.Services depend on each other. The lightest dependency in the cycle is TensorStack.WPF → TensorStack.WPF.Services (TensorStack.WPF.Common → TensorStack.WPF.Services.DownloadProgress, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
NoWarnInCsproj TensorStack.HuggingFace/TensorStack.HuggingFace.csproj:5— PRTEXP001 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj TensorStack.HuggingFace/TensorStack.HuggingFace.csproj:5— PRTEXP002 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj TensorStack.OnnxRuntime/TensorStack.OnnxRuntime.csproj:5— NU5100 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
NoWarnInCsproj TensorStack.OnnxRuntime.LLM/TensorStack.OnnxRuntime.LLM.csproj:5— NU5104 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (xUnit, NUnit or MSTest), and run it in CI so the gap cannot reopen.
Awaits without ConfigureAwait(false) — Only 1/230 awaits in library code use ConfigureAwait(false). A library that captures the caller's context can stall or deadlock its host — the classic way a dependency drags an app down.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/Backend.cs:89— `await LoadAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/Backend.cs:92— `await SetupAsync(BackendStatus.Update)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/Backend.cs:92— `await LoadAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/Backend.cs:96— `await SetupAsync(BackendStatus.Create)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/Backend.cs:96— `await LoadAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/FileQueue.cs:35— `await _signal.WaitAsync(_cts.Token)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/FileQueue.cs:45— `await Task.Delay(RetryDelayMs)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/TextInput.cs:41— `await File.WriteAllTextAsync(filename, Text)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Common/TextInput.cs:47— `await File.ReadAllTextAsync(filename, encoding, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Common/Extensions/Extensions.cs:189— `await cancellationTokenSource.CancelAsync()` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioInput.cs:71— `await Extensions.SaveAsync(this, filename, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioInput.cs:82— `await AudioManager.LoadTensorAsync(filename, audioCodec, sampleRate, channels, canc...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioInputStream.cs:38— `await AudioManager.LoadTensorAsync(SourceFile, audioCodec, sampleRate, channels, ca...` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioInputStream.cs:53— `await CreateAsync(newFilename)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioInputStream.cs:68— `await CreateAsync(newFilename)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioInputStream.cs:78— `await AudioManager.LoadInfoAsync(filename)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioManager.cs:36— `await ReadInfoAsync(filename)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioManager.cs:63— `await ReadAudioAsync(filename, audioCodec, sampleRate, channels, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioManager.cs:97— `await MuxAudioAsync(targetVideoFile, sourceVideoFile, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioManager.cs:138— `await ffmpeg.StandardOutput.BaseStream.CopyToAsync(audioStream, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioManager.cs:139— `await ffmpeg.WaitForExitAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioManager.cs:188— `await audioStream.WriteAsync(audioBuffer, cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioManager.cs:189— `await audioStream.FlushAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
Awaits without ConfigureAwait(false) TensorStack.Media/Audio/AudioManager.cs:191— `await ffmpeg.WaitForExitAsync(cancellationToken)` resumes on the caller's captured context. In library code that context belongs to the host application, so a host that blocks on this call (or runs on a UI thread) can stall or deadlock — append `.ConfigureAwait(false)`.
+ 13 more in this group — see findings.md.
X2 · Cancellation propagation· Async method without CancellationToken · ×38
Async method without CancellationToken: InitializeAsync TensorStack.Common/Common/Backend.cs:85— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: SaveAsync TensorStack.Common/Common/TextInput.cs:39— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: MoveAsync TensorStack.Media/Audio/AudioInputStream.cs:47— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CopyAsync TensorStack.Media/Audio/AudioInputStream.cs:62— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CreateAsync TensorStack.Media/Audio/AudioInputStream.cs:76— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadInfoAsync TensorStack.Media/Audio/AudioManager.cs:34— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: ExtractAudioAsync TensorStack.Media/Audio/AudioManager.cs:417— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: JoinSegmentsAsync TensorStack.Media/Audio/AudioManager.cs:452— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: SaveAsync TensorStack.Media/Image/Extensions.cs:40— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: SaveAsync TensorStack.Media/Image/Extensions.cs:58— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: MoveAsync TensorStack.Media/Video/VideoInputStream.cs:86— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CopyAsync TensorStack.Media/Video/VideoInputStream.cs:104— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: CreateAsync TensorStack.Media/Video/VideoInputStream.cs:120— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: LoadVideoInfoAsync TensorStack.Media/Video/VideoManager.cs:71— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: TokenizePromptAsync TensorStack.OnnxRuntime.LLM/Pipelines/EncoderDecoderPipeline.cs:61— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunEncoderAsync TensorStack.OnnxRuntime.LLM/Pipelines/EncoderDecoderPipeline.cs:72— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunDecoderAsync TensorStack.OnnxRuntime.LLM/Pipelines/EncoderDecoderPipeline.cs:94— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InitializeAsync TensorStack.OnnxRuntime.LLM/Pipelines/EncoderDecoderPipeline.cs:132— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunEncoderAsync TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:143— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunDecoderAsync TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:164— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunTextEmbedAsync TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:203— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunVisionEncoderAsync TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:224— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InitializeAsync TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:146— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: RunDecoderAsync TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:167— No CancellationToken parameter — this work can't be stopped early once started.
Async method without CancellationToken: InitializeAsync TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:116— No CancellationToken parameter — this work can't be stopped early once started.
Unfinished stub — throws NotImplementedException TensorStack.Common/Common/MapCollection.cs:107— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/BoolConverters.cs:36— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/BoolConverters.cs:51— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/BrushConverter.cs:22— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/BrushConverter.cs:41— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/BrushConverter.cs:58— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/IntConverter.cs:57— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/IntConverter.cs:79— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/IntConverter.cs:101— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/IntConverter.cs:124— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/IntConverter.cs:227— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/IntConverter.cs:261— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/IntConverter.cs:323— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/IntConverter.cs:358— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/StringConverter.cs:64— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/StringConverter.cs:82— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/StringConverter.cs:100— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/VisibilityConverters.cs:67— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/VisibilityConverters.cs:82— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/VisibilityConverters.cs:100— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/VisibilityConverters.cs:118— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/VisibilityConverters.cs:152— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/VisibilityConverters.cs:186— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/VisibilityConverters.cs:209— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException TensorStack.WPF/Converters/VisibilityConverters.cs:232— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
async void method: OnDrop TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:318— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: AudioControl_MediaEnded TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:422— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: AudioControl_MouseDown TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:435— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnDrop TensorStack.WPF/Controls/ImageEditElement.xaml.cs:827— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: AutoHideSplitter TensorStack.WPF/Controls/ImageElement.xaml.cs:266— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnDrop TensorStack.WPF/Controls/ImageElementBase.cs:310— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: WebView_NavigationStarting TensorStack.WPF/Controls/MarkdownElement.xaml.cs:698— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: WebView_WebMessageReceived TensorStack.WPF/Controls/MarkdownElement.xaml.cs:773— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnDrop TensorStack.WPF/Controls/PlaceholderTextBox.xaml.cs:83— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnDrop TensorStack.WPF/Controls/TextElement.xaml.cs:148— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: OnDrop TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:524— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: VideoControl_MediaEnded TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:618— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: VideoControl_MouseDown TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:632— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: AutoHideSplitter TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:792— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: VideoFrameListBox_MouseMove TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:936— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: TrackControl_DragStarted TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:1006— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: TrackControl_DragCompleted TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:1018— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Execute TensorStack.WPF/Utils/AsyncRelayCommand.cs:69— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
async void method: Execute TensorStack.WPF/Utils/AsyncRelayCommand.cs:144— `async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained.
TodoComment TensorStack.OnnxRuntime.LLM/Cache/KVCacheDecoder.cs:89— // TODO: Allocate entire Maxlength and update the buffer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime.LLM/Cache/KVCacheEncoderDecoder.cs:90— // TODO: Allocate entire Maxlength and update the buffer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime.LLM/Cache/KVCacheDecoder.cs:104— // TODO: Slice — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime.LLM/Cache/KVCacheEncoderDecoder.cs:118— // TODO: Slice — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime.LLM/Pipelines/DecoderPipeline.cs:264— // TODO: Diversity Penalty — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicProcessor.cs:225— // TODO: Need advanced normalizer for better performance — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicProcessor.cs:361— // TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/WhisperPipeline.cs:148— // <|nocaptions|> TODO: Options boolean — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/WhisperPipeline.cs:149— // <|notimestamps|> TODO: Timestamp processing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment TensorStack.OnnxRuntime/ModelSession.cs:100— // TODO: deadlock on model dispose when no synchronization context exists(console app) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
SC1 · Supply-chain hygiene· NuGet dependencies are not locked · ×8
NuGet dependencies are not locked TensorStack.Common/TensorStack.Common.csproj:8— TensorStack.Common/TensorStack.Common.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked TensorStack.HuggingFace/TensorStack.HuggingFace.csproj:15— TensorStack.HuggingFace/TensorStack.HuggingFace.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked TensorStack.Media/TensorStack.Media.csproj:14— TensorStack.Media/TensorStack.Media.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked TensorStack.OnnxRuntime.LLM/TensorStack.OnnxRuntime.LLM.csproj:16— TensorStack.OnnxRuntime.LLM/TensorStack.OnnxRuntime.LLM.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked TensorStack.OnnxRuntime.Vision/TensorStack.OnnxRuntime.Vision.csproj:15— TensorStack.OnnxRuntime.Vision/TensorStack.OnnxRuntime.Vision.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked TensorStack.OnnxRuntime/TensorStack.OnnxRuntime.csproj:15— TensorStack.OnnxRuntime/TensorStack.OnnxRuntime.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked TensorStack.StableDiffusionCpp/TensorStack.StableDiffusionCpp.csproj:14— TensorStack.StableDiffusionCpp/TensorStack.StableDiffusionCpp.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
NuGet dependencies are not locked TensorStack.WPF/TensorStack.WPF.csproj:16— TensorStack.WPF/TensorStack.WPF.csproj declares NuGet packages that no committed packages.lock.json resolves and no central package management pins — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the method that made it · ×7
Disposable created and abandoned in the method that made it TensorStack.Media/Audio/AudioManager.cs:371— `result` is a `Tensor`, which implements `IDisposable`, and it is created here (line 371). Every use of it in `CreateAudioTensor` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var result = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it TensorStack.OnnxRuntime.Vision/Pipelines/PosePipeline.cs:341— `tensor` is a `Tensor`, which implements `IDisposable`, and it is created here (line 341). Every use of it in `CreateTensor` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var tensor = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:234— `ones` is a `Tensor`, which implements `IDisposable`, and it is created here (line 234). Every use of it in `RunVisionEncoderAsync` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var ones = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicPipeline.cs:110— `audioTensor` is a `Tensor`, which implements `IDisposable`, and it is created here (line 110). Every use of it in `RunAsync` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var audioTensor = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it TensorStack.WPF/Services/DialogService.cs:47— `folderBrowserDialog` is a `FolderBrowserDialog`, which implements `IDisposable`, and it is created here (line 47). Every use of it in `OpenFolderAsync` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var folderBrowserDialog = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:691— `managedTensor` is a `Tensor`, which implements `IDisposable`, and it is created here (line 691). Every use of it in `ToManaged` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var managedTensor = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it TensorStack.StableDiffusionCpp/Native/StableDiffusionContext.cs:421— `managedImage` is a `ImageInput`, which implements `IDisposable`, and it is created here (line 421). Every use of it in `OnPromptImageCallback` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var managedImage = …;`), which releases it at the end of the scope on every path including a throw.
Duplicated block (8 lines × 2) TensorStack.HuggingFace/Common/GenerateImageOptions.cs:40— TensorStack.HuggingFace/Common/GenerateImageOptions.cs:40-47 | TensorStack.HuggingFace/Common/GenerateVideoOptions.cs:46-53 — before extracting anything, compare `TensorStack.HuggingFace/Common/GenerateImageOptions.cs` and `TensorStack.HuggingFace/Common/GenerateVideoOptions.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (8 lines × 2) TensorStack.HuggingFace/Common/Scheduler/HeliosOptions.cs:44— TensorStack.HuggingFace/Common/Scheduler/HeliosOptions.cs:44-51 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:49-56 — 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) TensorStack.HuggingFace/Common/Scheduler/EulerAncestralOptions.cs:34— TensorStack.HuggingFace/Common/Scheduler/EulerAncestralOptions.cs:34-41 | TensorStack.HuggingFace/Common/Scheduler/LMSOptions.cs:43-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/EulerAncestralOptions.cs:43` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/LMSOptions.cs:51` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:266— TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:266-273 | TensorStack.OnnxRuntime.Vision/Pipelines/UpscalePipeline.cs:220-227 — 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 `TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:266` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `ExtractorOptions` in one and `UpscaleOptions` 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 (8 lines × 2) TensorStack.HuggingFace/HuggingFacePipeline.cs:585— TensorStack.HuggingFace/HuggingFacePipeline.cs:585-592 | TensorStack.HuggingFace/HuggingFacePipeline.cs:611-618 — 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 `TensorStack.HuggingFace/HuggingFacePipeline.cs:611` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) TensorStack.Media/Image/Extensions.cs:42— TensorStack.Media/Image/Extensions.cs:42-49 | TensorStack.WPF/Image/Extensions.cs:55-62 — 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.
Swallowed exception (empty catch) TensorStack.Common/Extensions/Extensions.cs:174— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:71— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) TensorStack.OnnxRuntime/DeviceManager.cs:136— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicProcessor.cs:359— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:747— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) TensorStack.WPF/Dialogs/LoadVideoDialog.xaml.cs:280— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
AX2 · Stateful singletons· Process-global static state · ×5
Process-global static state: MediaManager REDACTED:11— `MediaManager` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (FFMpegPath, FFProbePath, DirectoryTemp; e.g. `FFMpegPath` at line 38). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: DeviceManager TensorStack.OnnxRuntime/DeviceManager.cs:11— `DeviceManager` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_deviceProvider, _environmentOptions, _environment, _devices; e.g. `_deviceProvider` at line 51). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: Provider TensorStack.OnnxRuntime/Providers/Provider.cs:10— `Provider` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_isInitialized; e.g. `_isInitialized` at line 24). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: ThemeDictionary TensorStack.WPF/ThemeDictionary.cs:12— `ThemeDictionary` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_theme; e.g. `_theme` at line 30). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
Process-global static state: NativeApi TensorStack.StableDiffusionCpp/Native/NativeApi.cs:10— `NativeApi` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_libraryHandle, _backendInfo; e.g. `_libraryHandle` at line 38). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×5
Edited copy of a member (14 corresponding lines) TensorStack.Common/Vision/CoordinateScaler.cs:35— TensorStack.Common/Vision/CoordinateScaler.cs:35-48 | TensorStack.Common/Vision/CoordinateScaler.cs:83-96 — 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) TensorStack.Media/Audio/AudioManager.cs:340— TensorStack.Media/Audio/AudioManager.cs:340-355 | REDACTED:195-208 — 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) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:487— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:487-500 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:522-536 — 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) TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:319— TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:319-332 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:525-538 — 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) TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:288— TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:288-301 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:494-507 — 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 (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) TensorStack.HuggingFace/Native/Python/lib/tensorstack/utils.py:517— TensorStack.HuggingFace/Native/Python/lib/tensorstack/utils.py:517-527 | TensorStack.HuggingFace/Native/Python/lib/tensorstack/utils.py:552-563 — 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) TensorStack.WPF/Converters/IntConverter.cs:45— TensorStack.WPF/Converters/IntConverter.cs:45-55 | TensorStack.WPF/Converters/VisibilityConverters.cs:197-207 — 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) TensorStack.WPF/Converters/IntConverter.cs:67— TensorStack.WPF/Converters/IntConverter.cs:67-77 | TensorStack.WPF/Converters/VisibilityConverters.cs:220-230 — 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) TensorStack.WPF/Converters/IntConverter.cs:89— TensorStack.WPF/Converters/IntConverter.cs:89-99 | TensorStack.WPF/Converters/VisibilityConverters.cs:243-253 — 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) TensorStack.WPF/Converters/IntConverter.cs:112— TensorStack.WPF/Converters/IntConverter.cs:112-122 | TensorStack.WPF/Converters/VisibilityConverters.cs:266-276 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 2) TensorStack.Common/Extensions/TensorExtensions.cs:1130— TensorStack.Common/Extensions/TensorExtensions.cs:1130-1136 | TensorStack.Common/Extensions/TensorExtensions.cs:1186-1192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:153— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:153-159 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:123-129 — before extracting anything, compare `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs` and `TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:153` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:169— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:169-175 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:139-145 — before extracting anything, compare `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs` and `TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (7 lines × 2) TensorStack.Common/Extensions/TensorExtensions.cs:886— TensorStack.Common/Extensions/TensorExtensions.cs:886-892 | TensorStack.Common/Extensions/TensorExtensions.cs:898-904 — 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 `TensorStack.Common/Extensions/TensorExtensions.cs:886` 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 × 2) TensorStack.Common/Image/ImageTiles.cs:71— TensorStack.Common/Image/ImageTiles.cs:71-77 | TensorStack.Common/Image/ImageTiles.cs:79-85 — 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 `TensorStack.Common/Image/ImageTiles.cs: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.
Unfinished branch — throws NotImplementedException TensorStack.Common/Extensions/TensorExtensions.cs:470— The branch `if (axis != 0)` throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws NotImplementedException TensorStack.Common/Extensions/TensorExtensions.cs:540— The branch `if (axis != 0)` throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws NotImplementedException TensorStack.Common/Extensions/TensorExtensions.cs:565— The branch `if (axis != 0)` throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws NotImplementedException TensorStack.OnnxRuntime/OrtExtensions.cs:265— The catch-all arm (reached by `String`, `Bool`, `Complex64`, `Complex128` and 1 more) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
Unfinished branch — throws NotImplementedException TensorStack.OnnxRuntime/OrtExtensions.cs:326— The catch-all arm (reached by `String`, `Bool`, `Complex64`, `Complex128` and 1 more) throws `NotImplementedException` while the member's other paths do the work — the branch was never written, so every input that reaches it fails at run time. Implement the branch, or reject the input where it enters with an exception that says it is not supported.
TooManyMethods: VideoStreamElement TensorStack.WPF/Controls/VideoStreamElement.xaml.cs— TooManyMethods — 440 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: ImageEditElement TensorStack.WPF/Controls/ImageEditElement.xaml.cs— TooManyMethods — 360 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MarkdownElement TensorStack.WPF/Controls/MarkdownElement.xaml.cs— TooManyMethods — 441 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: ModelParameters TensorStack.OnnxRuntime/ModelParameters.cs— TooManyMethods — 114 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (16 lines × 2) TensorStack.HuggingFace/HuggingFacePipeline.cs:179— TensorStack.HuggingFace/HuggingFacePipeline.cs:179-194 | TensorStack.HuggingFace/HuggingFacePipeline.cs:217-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TensorStack.HuggingFace/HuggingFacePipeline.cs:179` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `GenerateImageOptions` in one and `GenerateVideoOptions` 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 (16 lines × 2) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:186— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:186-201 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:186-201 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 329 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. 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 (16 lines × 2) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:246— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:246-261 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:246-261 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 329 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. 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 (16 lines × 2) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:164— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:164-179 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:164-179 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 329 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:49— TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:49-59 | TensorStack.HuggingFace/Common/Scheduler/CogVideoXDPMOptions.cs:49-59 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDPMOptions.cs` as WHOLE FILES: 82% 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDPMOptions.cs:46` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:47` 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) TensorStack.WPF/Common.cs:131— TensorStack.WPF/Common.cs:131-144 | TensorStack.WPF/Common.cs:168-178 — 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 `TensorStack.WPF/Common.cs:131` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) TensorStack.Common/Common/FileHelper.cs:221— TensorStack.Common/Common/FileHelper.cs:221-231 | TensorStack.Common/Common/FileQueue.cs:55-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) TensorStack.WPF/Controls/ImageElement.xaml.cs:268— TensorStack.WPF/Controls/ImageElement.xaml.cs:268-278 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:794-804 — 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 (5 lines × 2) TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:723— TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:723-727 | TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:732-736 — 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 `TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:723` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:737` calls `DenormalizeToByte` and `TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:728` 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 (5 lines × 2) TensorStack.Common/Extensions/TensorExtensions.cs:893— TensorStack.Common/Extensions/TensorExtensions.cs:893-897 | TensorStack.Common/Extensions/TensorExtensions.cs:906-910 — 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) TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:437— TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:437-441 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:634-638 — 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 (5 lines × 2) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:496— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:496-500 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:532-536 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:529` calls `permute`, `squeeze` and `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:493` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×3
Edited copy of a member (17 corresponding lines) TensorStack.Common/Extensions/TensorExtensions.cs:593— TensorStack.Common/Extensions/TensorExtensions.cs:593-617 | TensorStack.Common/Extensions/TensorExtensions.cs:930-946 — 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) TensorStack.Common/Extensions/TensorExtensions.cs:776— TensorStack.Common/Extensions/TensorExtensions.cs:776-792 | TensorStack.Common/Extensions/TensorExtensions.cs:801-819 — 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) TensorStack.WPF/Controls/DialogControl.cs:19— TensorStack.WPF/Controls/DialogControl.cs:19-35 | TensorStack.WPF/Controls/WindowBase.cs:19-35 — 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 (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:168— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:168-175 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:138-145 — 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) TensorStack.OnnxRuntime/OrtExtensions.cs:402— TensorStack.OnnxRuntime/OrtExtensions.cs:402-409 | TensorStack.OnnxRuntime/OrtExtensions.cs:439-446 — 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) TensorStack.WPF/Controls/ImageElement.xaml.cs:316— TensorStack.WPF/Controls/ImageElement.xaml.cs:316-323 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:847-854 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×3
Edited copy of a member (9 corresponding lines) TensorStack.Common/Tensor/ImageTensor.cs:189— TensorStack.Common/Tensor/ImageTensor.cs:189-199 | TensorStack.Common/Tensor/ImageTensor.cs:211-219 — 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) TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:390— TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:390-398 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:602-610 — 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) TensorStack.Media/Image/Extensions.cs:41— TensorStack.Media/Image/Extensions.cs:41-49 | TensorStack.WPF/Image/Extensions.cs:54-62 — 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.
Duplicated block (17 lines × 2) TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:179— TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:179-195 | TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:223-239 — 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 `TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:179` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) TensorStack.HuggingFace/Common/Scheduler/DPMSolverSDEOptions.cs:28— TensorStack.HuggingFace/Common/Scheduler/DPMSolverSDEOptions.cs:28-44 | TensorStack.HuggingFace/Common/Scheduler/HeunOptions.cs:28-44 — 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 (17 lines × 2) TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorenceTokenizer.cs:91— TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorenceTokenizer.cs:91-107 | TensorStack.OnnxRuntime.LLM/Tokenizers/BPETokenizer.cs:194-210 — 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 `TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorenceTokenizer.cs:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 4) TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:55— TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:55-68 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:58-71 | TensorStack.HuggingFace/Common/Scheduler/SASolverOptions.cs:55-68 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:55-68 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (14 lines × 4) TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:58— TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:58-71 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverSinglestepOptions.cs:58-71 | TensorStack.HuggingFace/Common/Scheduler/SASolverOptions.cs:58-71 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:58-71 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DPMSolverSinglestepOptions.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/SASolverOptions.cs:76` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:74` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 4) TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:43— TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:43-56 | TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:49-62 | TensorStack.HuggingFace/Common/Scheduler/DDPMOptions.cs:49-62 | TensorStack.HuggingFace/Common/Scheduler/LCMOptions.cs:52-65 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:58` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:63` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) TensorStack.HuggingFace/Common/Scheduler/EDMDPMSolverMultistepOptions.cs:16— TensorStack.HuggingFace/Common/Scheduler/EDMDPMSolverMultistepOptions.cs:16-29 | TensorStack.HuggingFace/Common/Scheduler/EDMEulerOptions.cs:16-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/EDMEulerOptions.cs:34` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/EDMDPMSolverMultistepOptions.cs:32` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) TensorStack.HuggingFace/Common/Scheduler/HeliosDMDOptions.cs:19— TensorStack.HuggingFace/Common/Scheduler/HeliosDMDOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/HeliosOptions.cs:20-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/HeliosOptions.cs:38` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/HeliosDMDOptions.cs:35` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) TensorStack.HuggingFace/Common/PipelineProgress.cs:9— TensorStack.HuggingFace/Common/PipelineProgress.cs:9-22 | TensorStack.StableDiffusionCpp/Common/PipelineProgress.cs:9-22 — 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 `TensorStack.HuggingFace/Common/PipelineProgress.cs:9` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:40— TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:40-52 | TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:46-58 | TensorStack.HuggingFace/Common/Scheduler/DDPMOptions.cs:46-58 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:37` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:44` 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) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:224— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:224-236 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:280-292 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:280-292 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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 `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:365— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:365-377 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:424-436 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:424-436 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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 (9 lines × 2) TensorStack.StableDiffusionCpp/Native/StableDiffusionContext.cs:148— TensorStack.StableDiffusionCpp/Native/StableDiffusionContext.cs:148-156 | TensorStack.StableDiffusionCpp/Native/StableDiffusionContext.cs:198-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `TensorStack.StableDiffusionCpp/Native/StableDiffusionContext.cs:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `GenerateImageOptions` in one and `GenerateVideoOptions` 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 (9 lines × 2) TensorStack.Media/Audio/AudioManager.cs:154— TensorStack.Media/Audio/AudioManager.cs:154-162 | TensorStack.Media/Audio/AudioManager.cs:179-187 — 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 `TensorStack.Media/Audio/AudioManager.cs: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 (9 lines × 2) TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:767— TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:767-775 | TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:776-784 — 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 `TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:767` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:786` calls `NormalizeToFloat` and `TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:777` 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.
FixmeComment TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicProcessor.cs:228— // FIXME: this should be fixed for non-English languages — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicProcessor.cs:262— // Remove combining diacritics // FIXME: this should be fixed for non-English languages — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×2
Edited copy of a member (25 corresponding lines) TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:258— TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:258-282 | TensorStack.OnnxRuntime.Vision/Pipelines/UpscalePipeline.cs:213-237 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) TensorStack.StableDiffusionCpp/Native/NativeOptions.cs:274— TensorStack.StableDiffusionCpp/Native/NativeOptions.cs:274-298 | TensorStack.StableDiffusionCpp/Native/NativeOptions.cs:307-331 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/WhisperPipeline.cs:48— TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/WhisperPipeline.cs:48-77 | TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/WhisperPipeline.cs:87-122 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) TensorStack.OnnxRuntime.LLM/Pipelines/EncoderDecoderPipeline.cs:95— TensorStack.OnnxRuntime.LLM/Pipelines/EncoderDecoderPipeline.cs:95-124 | TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:165-195 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) TensorStack.StableDiffusionCpp/Native/NativeOptions.cs:221— TensorStack.StableDiffusionCpp/Native/NativeOptions.cs:221-242 | TensorStack.StableDiffusionCpp/Native/NativeOptions.cs:340-361 — These two members are one piece of code written twice and then edited apart: 22 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 (22 corresponding lines) TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorenceTokenizer.cs:77— TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorenceTokenizer.cs:77-107 | TensorStack.OnnxRuntime.LLM/Tokenizers/BPETokenizer.cs:189-210 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×2
Edited copies of one member (3 members, 12+ corresponding lines) TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:117— TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:117-133 | TensorStack.OnnxRuntime.Vision/Pipelines/PosePipeline.cs:109-120 | TensorStack.OnnxRuntime.Vision/Pipelines/UpscalePipeline.cs:113-126 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:144— TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:144-156 | TensorStack.OnnxRuntime.LLM/Pipelines/Florence/FlorencePipeline.cs:204-215 | TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/WhisperPipeline.cs:172-183 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) TensorStack.Media/Audio/AudioManager.cs:256— TensorStack.Media/Audio/AudioManager.cs:256-275 | TensorStack.Media/Audio/AudioManager.cs:284-303 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) TensorStack.WPF/Dialogs/LoadVideoDialog.xaml.cs:90— TensorStack.WPF/Dialogs/LoadVideoDialog.xaml.cs:90-109 | TensorStack.WPF/Dialogs/LoadVideoDialog.xaml.cs:116-135 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) TensorStack.HuggingFace/HuggingFacePipeline.cs:360— TensorStack.HuggingFace/HuggingFacePipeline.cs:360-381 | TensorStack.HuggingFace/HuggingFacePipeline.cs:388-406 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) TensorStack.WPF/Converters/VisibilityConverters.cs:132— TensorStack.WPF/Converters/VisibilityConverters.cs:132-150 | TensorStack.WPF/Converters/VisibilityConverters.cs:166-184 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) TensorStack.OnnxRuntime.Vision/Pipelines/BackgroundPipeline.cs:57— TensorStack.OnnxRuntime.Vision/Pipelines/BackgroundPipeline.cs:57-62 | TensorStack.OnnxRuntime.Vision/Pipelines/PosePipeline.cs:66-71 — 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) TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:436— TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:436-441 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:633-638 — 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 (20 lines × 2) TensorStack.HuggingFace/Common/GenerateAudioOptions.cs:40— TensorStack.HuggingFace/Common/GenerateAudioOptions.cs:40-59 | TensorStack.HuggingFace/Common/GenerateVideoOptions.cs:64-83 — before extracting anything, compare `TensorStack.HuggingFace/Common/GenerateAudioOptions.cs` and `TensorStack.HuggingFace/Common/GenerateVideoOptions.cs` as WHOLE FILES: this scan already matched 3 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.
Duplicated block (20 lines × 2) TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:76— TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:76-95 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:70-89 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 3) TensorStack.HuggingFace/Common/GenerateAudioOptions.cs:49— TensorStack.HuggingFace/Common/GenerateAudioOptions.cs:49-62 | TensorStack.HuggingFace/Common/GenerateImageOptions.cs:55-68 | TensorStack.HuggingFace/Common/GenerateVideoOptions.cs:73-86 — before extracting anything, compare `TensorStack.HuggingFace/Common/GenerateAudioOptions.cs` and `TensorStack.HuggingFace/Common/GenerateVideoOptions.cs` as WHOLE FILES: this scan already matched 3 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `TensorStack.HuggingFace/Common/GenerateAudioOptions.cs:46` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/GenerateImageOptions.cs:53` 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 (14 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:335— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:335-348 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:394-407 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:394-407 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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 `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:335` 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 (10 lines × 3) TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:37— TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:37-46 | TensorStack.HuggingFace/Common/Scheduler/DDPMOptions.cs:37-46 | TensorStack.HuggingFace/Common/Scheduler/LCMOptions.cs:40-49 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DDPMOptions.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/LCMOptions.cs:52` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:47` 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 (10 lines × 3) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:200— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:200-209 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:169-178 | TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/WhisperPipeline.cs:207-216 — before extracting anything, compare `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs` and `TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:200` 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, `TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:164` calls `AddInput` and `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:194` 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 (9 lines × 3) TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:96— TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:96-105 | TensorStack.OnnxRuntime.Vision/Pipelines/PosePipeline.cs:90-98 | TensorStack.OnnxRuntime.Vision/Pipelines/UpscalePipeline.cs:93-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:96` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `options` to `ExtractorVideoOptions` in one and `PoseVideoOptions` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.OnnxRuntime.Vision/Pipelines/UpscalePipeline.cs:114` calls `LoadAsync` and `TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:118` 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 (9 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:98— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:98-106 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:97-105 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:97-105 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (12 lines × 3) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:45— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:45-58 | TensorStack.OnnxRuntime.LLM/Pipelines/Other/SummaryPipeline.cs:33-46 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:45-56 — before extracting anything, compare `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs` and `TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 (12 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:252— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:252-263 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:308-319 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:308-319 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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. 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.
Outbound HTTP without resilience TensorStack.HuggingFace/HuggingFaceBackend.cs:226— `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
Outbound HTTP without resilience TensorStack.StableDiffusionCpp/StableDiffusionBackend.cs:193— `new HttpClient()` builds an outbound HTTP client and nothing bounds it: no timeout is set on it and no retry or resilience policy wraps its calls in the type that owns it. This codebase ships libraries/tools rather than a service it operates, so the failure lands as a hung caller — a build step, a CLI run, a UI thread — with no way out.
Sync-over-async blocking — 1 blocking call(s) on async work (.Wait()/.GetAwaiter().GetResult()) — these waste a thread and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
Sync-over-async blocking TensorStack.Media/Video/VideoInput.cs:45— `.GetAwaiter().GetResult()` blocks this thread until the async work completes — it wastes a thread-pool thread for as long as the work runs and can deadlock wherever a synchronization context is in play (a UI thread, or a caller that has one).
X18 · Disposal-pattern correctness· Owned disposable field overwritten without releasing the previous instance · ×2
Owned disposable field overwritten without releasing the previous instance TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:693— `_cancellationTokenSource` is a `CancellationTokenSource` this type creates itself, and here (line 693) a new instance is written over it — but `LoadVideoFramesAsync` itself reads through `_cancellationTokenSource` before replacing it, so it expects an instance to be there, and nothing earlier in `LoadVideoFramesAsync` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_cancellationTokenSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Owned disposable field overwritten without releasing the previous instance TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:742— `_cancellationTokenSource` is a `CancellationTokenSource` this type creates itself, and here (line 742) a new instance is written over it — but `GetVideoFrameAsync` itself reads through `_cancellationTokenSource` before replacing it, so it expects an instance to be there, and nothing earlier in `GetVideoFrameAsync` disposes, closes, saves or hands on the instance being replaced. The assignment makes it unreachable while it still holds what it holds (a timer that keeps firing, a callback registered on a longer-lived token, a socket, a handle), and no later `Dispose` can reach it: the type's own disposal releases only the CURRENT instance. The cost accumulates once per overwrite. Release the previous instance first (`_cancellationTokenSource?.Dispose();` before the assignment), or swap it out with `Interlocked.Exchange` and dispose what comes back.
Stateful singleton: NavigationService TensorStack.WPF/Services/NavigationService.cs:12— `NavigationService` is a singleton (one shared instance) but mutates instance state outside any lock (_host, _views; e.g. `_host` at line 29).
Stateful shared instance: LocalizationService TensorStack.WPF/Services/LocalizationService.cs:11— `LocalizationService` keeps one instance of itself in the static `_instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_cultureInfo; e.g. `_cultureInfo` at line 47).
quantization.pretrained_config (cyclomatic 24) TensorStack.HuggingFace/Native/Python/lib/tensorstack/quantization.py:112— quantization.pretrained_config has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
utils.get_model_config (cyclomatic 23) TensorStack.HuggingFace/Native/Python/lib/tensorstack/utils.py:96— utils.get_model_config has cyclomatic complexity 23 (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.
TensorExtensions.ConcatenateAxis1 (cyclomatic 22) TensorStack.Common/Extensions/TensorExtensions.cs:872— TensorExtensions.ConcatenateAxis1 has cyclomatic complexity 22 (threshold 15). 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.
quantization.auto_pretrained_config (cyclomatic 17) TensorStack.HuggingFace/Native/Python/lib/tensorstack/quantization.py:69— quantization.auto_pretrained_config has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Prerelease dependency: Microsoft.ML.Tokenizers — Microsoft.ML.Tokenizers resolves to 2.0.0-preview.1.25125.4, a prerelease build. Prerelease packages carry no support policy, may change breaking between previews and can be unlisted — pin a stable release before shipping, or record the reason this preview is required.
TensorExtensions.ConcatenateAxis1 (cognitive 60) TensorStack.Common/Extensions/TensorExtensions.cs:872— TensorExtensions.ConcatenateAxis1 has cognitive complexity 60 (threshold 15). 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. This file is where this pass's cognitive complexity CONCENTRATES: TensorStack.Common/Extensions/TensorExtensions.cs holds 2 of the 20 methods over the threshold — including the worst — and 47 of the 148 points over it (32%), 2.8× the next-largest file (TensorStack.WPF/Services/MarkdownConverter.cs at 17). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
TagBlockRenderer.Write (cognitive 32) TensorStack.WPF/Services/MarkdownConverter.cs:370— TagBlockRenderer.Write has cognitive complexity 32 (threshold 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.
DecoderPipeline.BeamSearchAsync (cognitive 29) TensorStack.OnnxRuntime.LLM/Pipelines/DecoderPipeline.cs:164— DecoderPipeline.BeamSearchAsync has cognitive complexity 29 (threshold 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.
quantization.pretrained_config (cognitive 27) TensorStack.HuggingFace/Native/Python/lib/tensorstack/quantization.py:112— quantization.pretrained_config has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 1 (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.
DownloadService.DownloadAsync (cognitive 23) TensorStack.WPF/Services/DownloadService.cs:92— DownloadService.DownloadAsync has cognitive complexity 23 (threshold 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.
MarkdownElement.WebView_NavigationStarting (cognitive 22) TensorStack.WPF/Controls/MarkdownElement.xaml.cs:698— MarkdownElement.WebView_NavigationStarting has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
utils.get_model_config (cognitive 22) TensorStack.HuggingFace/Native/Python/lib/tensorstack/utils.py:96— utils.get_model_config has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 20, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SupertonicProcessor.ChunkText (cognitive 21) TensorStack.OnnxRuntime.LLM/Pipelines/Supertonic/SupertonicProcessor.cs:99— SupertonicProcessor.ChunkText has cognitive complexity 21 (threshold 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.
HuggingFaceBackend.DownloadAsync (cognitive 21) TensorStack.HuggingFace/HuggingFaceBackend.cs:201— HuggingFaceBackend.DownloadAsync has cognitive complexity 21 (threshold 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.
PostProcessor.ExtractCoordinatePolygons (cognitive 20) TensorStack.OnnxRuntime.LLM/Pipelines/Florence/PostProcessor.cs:131— PostProcessor.ExtractCoordinatePolygons has cognitive complexity 20 (threshold 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.
ImageElementBase.LoadImageAsync (cognitive 20) TensorStack.WPF/Controls/ImageElementBase.cs:260— ImageElementBase.LoadImageAsync has cognitive complexity 20 (threshold 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.
quantization.auto_pretrained_config (cognitive 19) TensorStack.HuggingFace/Native/Python/lib/tensorstack/quantization.py:69— quantization.auto_pretrained_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (19 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VideoManager.ReadStreamAsync (cognitive 18) TensorStack.Media/Video/VideoManager.cs:168— VideoManager.ReadStreamAsync has cognitive complexity 18 (threshold 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.
TensorExtensions.PadEnd (cognitive 17) TensorStack.Common/Extensions/TensorExtensions.cs:592— TensorExtensions.PadEnd has cognitive complexity 17 (threshold 15). 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. This file is where this pass's cognitive complexity CONCENTRATES: TensorStack.Common/Extensions/TensorExtensions.cs holds 2 of the 20 methods over the threshold — including the worst — and 47 of the 148 points over it (32%), 2.8× the next-largest file (TensorStack.WPF/Services/MarkdownConverter.cs at 17). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
export.encode_video (cognitive 17) TensorStack.HuggingFace/Native/Python/lib/tensorstack/export.py:95— export.encode_video has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 5). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
BackgroundPipeline.ExtractBackgroundInternalAsync (cognitive 16) TensorStack.OnnxRuntime.Vision/Pipelines/BackgroundPipeline.cs:79— BackgroundPipeline.ExtractBackgroundInternalAsync has cognitive complexity 16 (threshold 15). 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.
AddIntConverter.Convert (cognitive 16) TensorStack.WPF/Converters/IntConverter.cs:202— AddIntConverter.Convert has cognitive complexity 16 (threshold 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. This shape REPEATS in the file: 3 other methods here (SubtractIntConverter.Convert, DivideByConverter.Convert, MultiplyByConverter.Convert) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
SubtractIntConverter.Convert (cognitive 16) TensorStack.WPF/Converters/IntConverter.cs:236— SubtractIntConverter.Convert has cognitive complexity 16 (threshold 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. This shape REPEATS in the file: 3 other methods here (AddIntConverter.Convert, DivideByConverter.Convert, MultiplyByConverter.Convert) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
DivideByConverter.Convert (cognitive 16) TensorStack.WPF/Converters/IntConverter.cs:298— DivideByConverter.Convert has cognitive complexity 16 (threshold 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. This shape REPEATS in the file: 3 other methods here (AddIntConverter.Convert, SubtractIntConverter.Convert, MultiplyByConverter.Convert) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
MultiplyByConverter.Convert (cognitive 16) TensorStack.WPF/Converters/IntConverter.cs:333— MultiplyByConverter.Convert has cognitive complexity 16 (threshold 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. This shape REPEATS in the file: 3 other methods here (AddIntConverter.Convert, SubtractIntConverter.Convert, DivideByConverter.Convert) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FileTooLong: tensorstack/utils.py TensorStack.HuggingFace/Native/Python/lib/tensorstack/utils.py— FileTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 40 over it, 1.08× 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.
Change coupling: HuggingFacePipeline.cs ↔ utils.py TensorStack.HuggingFace/HuggingFacePipeline.cs:1— `TensorStack.HuggingFace/HuggingFacePipeline.cs` and `TensorStack.HuggingFace/Native/Python/lib/tensorstack/utils.py` change together 54% of the time (7 of the 13 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `81006877` Propagate audio tensors to AutoTextPipeline (at that commit the files were still `TensorStack.Python/PythonPipeline.cs` and `TensorStack.Python/Python/lib/tensorstack/utils.py`); `4b60e1de` Fix token streaming / height calculation (at that commit the files were still `TensorStack.Python/PythonPipeline.cs` and `TensorStack.Python/Python/lib/tensorstack/utils.py`); `f9ab6fdc` Live token count (at that commit the files were still `TensorStack.Python/PythonPipeline.cs` and `TensorStack.Python/Python/lib/tensorstack/utils.py`) — run `git show` on any of them.
D4 · Code Duplication· Edited copies of one member (3 members, 92+ corresponding lines) · ×1
Edited copies of one member (3 members, 92+ corresponding lines) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:365— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:365-480 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:424-515 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:424-517 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 92 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 (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:705— TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:705-740 | TensorStack.StableDiffusionCpp/Native/NativeApiExtensions.cs:751-794 — These two members are one piece of code written twice and then edited apart: 36 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 (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) TensorStack.OnnxRuntime.Vision/Pipelines/InterpolationPipeline.cs:62— TensorStack.OnnxRuntime.Vision/Pipelines/InterpolationPipeline.cs:62-101 | TensorStack.OnnxRuntime.Vision/Pipelines/InterpolationPipeline.cs:111-145 — These two members are one piece of code written twice and then edited apart: 35 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 (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:168— TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:168-202 | TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:213-246 — These two members are one piece of code written twice and then edited apart: 34 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, 40+ corresponding lines) · ×1
Edited copies of one member (3 members, 40+ corresponding lines) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:252— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:252-291 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:308-347 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:308-347 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 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, 28+ corresponding lines) · ×1
Edited copies of one member (4 members, 28+ corresponding lines) TensorStack.HuggingFace/HuggingFacePipeline.cs:176— TensorStack.HuggingFace/HuggingFacePipeline.cs:176-205 | TensorStack.HuggingFace/HuggingFacePipeline.cs:214-243 | TensorStack.HuggingFace/HuggingFacePipeline.cs:252-279 | TensorStack.HuggingFace/HuggingFacePipeline.cs:288-323 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 28 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 (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:233— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:233-261 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:233-261 — These two members are one piece of code written twice and then edited apart: 29 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, 23+ corresponding lines) · ×1
Edited copies of one member (4 members, 23+ corresponding lines) TensorStack.WPF/Converters/IntConverter.cs:203— TensorStack.WPF/Converters/IntConverter.cs:203-225 | TensorStack.WPF/Converters/IntConverter.cs:237-259 | TensorStack.WPF/Converters/IntConverter.cs:299-321 | TensorStack.WPF/Converters/IntConverter.cs:334-356 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 23 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) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:188— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:188-216 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:158-185 — 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 (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:85— TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:85-105 | TensorStack.OnnxRuntime.Vision/Pipelines/PosePipeline.cs:82-98 | TensorStack.OnnxRuntime.Vision/Pipelines/UpscalePipeline.cs:84-101 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:197— TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:197-246 | TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/WhisperPipeline.cs:260-326 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:147— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:147-159 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:117-129 — 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 copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) TensorStack.HuggingFace/Native/Python/lib/tensorstack/data_objects.py:242— TensorStack.HuggingFace/Native/Python/lib/tensorstack/data_objects.py:242-249 | TensorStack.HuggingFace/Native/Python/lib/tensorstack/data_objects.py:285-295 | TensorStack.HuggingFace/Native/Python/lib/tensorstack/data_objects.py:329-338 — 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 copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:473— TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:473-492 | TensorStack.WPF/Controls/ImageElement.xaml.cs:355-374 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:886-905 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) TensorStack.Media/Audio/AudioManager.cs:153— TensorStack.Media/Audio/AudioManager.cs:153-168 | TensorStack.Media/Audio/AudioManager.cs:178-193 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) TensorStack.HuggingFace/HuggingFacePipeline.cs:80— TensorStack.HuggingFace/HuggingFacePipeline.cs:80-102 | TensorStack.HuggingFace/HuggingFacePipeline.cs:111-140 | TensorStack.HuggingFace/HuggingFacePipeline.cs:147-167 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) TensorStack.OnnxRuntime/OrtExtensions.cs:341— TensorStack.OnnxRuntime/OrtExtensions.cs:341-350 | TensorStack.OnnxRuntime/OrtExtensions.cs:382-391 | TensorStack.OnnxRuntime/OrtExtensions.cs:419-428 — 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 copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) TensorStack.WPF/Services/MarkdownConverter.cs:149— TensorStack.WPF/Services/MarkdownConverter.cs:149-164 | TensorStack.WPF/Services/MarkdownConverter.cs:175-189 — 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 (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) TensorStack.Media/Audio/AudioManager.cs:110— TensorStack.Media/Audio/AudioManager.cs:110-121 | TensorStack.Media/Audio/AudioManager.cs:133-144 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) TensorStack.Media/Audio/AudioManager.cs:202— TensorStack.Media/Audio/AudioManager.cs:202-219 | TensorStack.Media/Audio/AudioManager.cs:229-247 — 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 (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) TensorStack.OnnxRuntime.LLM/Cache/KVCacheDecoder.cs:101— TensorStack.OnnxRuntime.LLM/Cache/KVCacheDecoder.cs:101-107 | TensorStack.OnnxRuntime.LLM/Cache/KVCacheEncoderDecoder.cs:115-121 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) TensorStack.WPF/Controls/ImageElement.xaml.cs:304— TensorStack.WPF/Controls/ImageElement.xaml.cs:304-308 | TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:835-839 — These two members are one piece of code written twice and then edited apart: 5 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, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) TensorStack.WPF/Controls/ImageEditElement.xaml.cs:342— TensorStack.WPF/Controls/ImageEditElement.xaml.cs:342-349 | TensorStack.WPF/Controls/ImageEditElement.xaml.cs:366-373 | TensorStack.WPF/Controls/ImageElement.xaml.cs:199-209 | TensorStack.WPF/Controls/ImageElementBase.cs:179-185 — 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 (10 corresponding lines) · ×1
Edited copy of a member (10 corresponding lines) TensorStack.WPF/Controls/DialogControl.cs:155— TensorStack.WPF/Controls/DialogControl.cs:155-164 | TensorStack.WPF/Controls/WindowBase.cs:96-105 — 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.
Duplicated block (38 lines × 2) TensorStack.HuggingFace/Common/Scheduler/FlowMatchEulerOptions.cs:16— TensorStack.HuggingFace/Common/Scheduler/FlowMatchEulerOptions.cs:16-53 | TensorStack.HuggingFace/Common/Scheduler/FlowMatchLCMOptions.cs:19-56 — 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 (23 lines × 3) TensorStack.HuggingFace/Common/GenerateAudioOptions.cs:10— TensorStack.HuggingFace/Common/GenerateAudioOptions.cs:10-32 | TensorStack.HuggingFace/Common/GenerateImageOptions.cs:10-32 | TensorStack.HuggingFace/Common/GenerateVideoOptions.cs:10-32 — before extracting anything, compare `TensorStack.HuggingFace/Common/GenerateAudioOptions.cs` and `TensorStack.HuggingFace/Common/GenerateVideoOptions.cs` as WHOLE FILES: this scan already matched 3 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/GenerateAudioOptions.cs:37` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/GenerateImageOptions.cs:35` 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 (24 lines × 2) TensorStack.HuggingFace/Common/GenerateImageOptions.cs:58— TensorStack.HuggingFace/Common/GenerateImageOptions.cs:58-81 | TensorStack.HuggingFace/Common/GenerateVideoOptions.cs:76-99 — before extracting anything, compare `TensorStack.HuggingFace/Common/GenerateImageOptions.cs` and `TensorStack.HuggingFace/Common/GenerateVideoOptions.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (21–23 lines × 3) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:68— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:68-90 | TensorStack.OnnxRuntime.LLM/Pipelines/Other/SummaryPipeline.cs:56-76 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:66-86 — before extracting anything, compare `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs` and `TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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. 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 (22 lines × 3) TensorStack.HuggingFace/Common/Scheduler/KDPM2AncestralOptions.cs:25— TensorStack.HuggingFace/Common/Scheduler/KDPM2AncestralOptions.cs:25-46 | TensorStack.HuggingFace/Common/Scheduler/KDPM2Options.cs:25-46 | TensorStack.HuggingFace/Common/Scheduler/LMSOptions.cs:25-46 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/KDPM2AncestralOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/KDPM2Options.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 (19 lines × 4) TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:25— TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:25-43 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:25-43 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverSinglestepOptions.cs:25-43 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:25-43 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:38— TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:38-55 | TensorStack.HuggingFace/Common/Scheduler/DDPMOptions.cs:38-55 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DDPMOptions.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (14 lines × 19) TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:19— TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/CogVideoXDPMOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/DDIMOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/DDPMOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverSDEOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverSinglestepOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/EulerAncestralOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/EulerOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/HeunOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/KDPM2AncestralOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/KDPM2Options.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/LCMOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/LMSOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/PNDMOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/SASolverOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/TCDOptions.cs:19-32 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:19-32 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDPMOptions.cs` as WHOLE FILES: 82% 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDPMOptions.cs:37` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/CogVideoXDDIMOptions.cs:35` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14–16 lines × 2) TensorStack.Common/Extensions/TensorExtensions.cs:776— TensorStack.Common/Extensions/TensorExtensions.cs:776-789 | TensorStack.Common/Extensions/TensorExtensions.cs:801-816 — 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 `TensorStack.Common/Extensions/TensorExtensions.cs:776` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 7) TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:37— TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:37-47 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:37-47 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverSinglestepOptions.cs:37-47 | TensorStack.HuggingFace/Common/Scheduler/EDMDPMSolverMultistepOptions.cs:37-47 | TensorStack.HuggingFace/Common/Scheduler/SASolverOptions.cs:40-50 | TensorStack.HuggingFace/Common/Scheduler/TCDOptions.cs:49-59 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:37-47 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:52` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:50` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 5) TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:58— TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:58-68 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:61-71 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverSinglestepOptions.cs:58-68 | TensorStack.HuggingFace/Common/Scheduler/SASolverOptions.cs:58-68 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:58-68 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:76` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:71` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14–15 lines × 2) TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:195— TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:195-209 | TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:165-178 — before extracting anything, compare `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs` and `TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 76 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 `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:195` 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, `TensorStack.OnnxRuntime.LLM/Pipelines/Phi/Phi3Pipeline.cs:164` calls `AddInput` and `TensorStack.OnnxRuntime.LLM/Pipelines/Llama/LlamaPipeline.cs:194` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 4) TensorStack.HuggingFace/Common/Scheduler/EulerOptions.cs:37— TensorStack.HuggingFace/Common/Scheduler/EulerOptions.cs:37-47 | TensorStack.HuggingFace/Common/Scheduler/KDPM2AncestralOptions.cs:34-44 | TensorStack.HuggingFace/Common/Scheduler/KDPM2Options.cs:34-44 | TensorStack.HuggingFace/Common/Scheduler/LMSOptions.cs:34-44 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/KDPM2AncestralOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/KDPM2Options.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 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 (8 lines × 3) TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:70— TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:70-77 | TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:76-83 | TensorStack.HuggingFace/Common/Scheduler/UniPCMultistepOptions.cs:70-77 — before extracting anything, compare `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs` and `TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `TensorStack.HuggingFace/Common/Scheduler/DPMSolverMultistepOptions.cs:88` calls `JsonPropertyName` and `TensorStack.HuggingFace/Common/Scheduler/DEISMultistepOptions.cs:80` 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 (9–10 lines × 2) TensorStack.WPF/Controls/DialogControl.cs:24— TensorStack.WPF/Controls/DialogControl.cs:24-33 | TensorStack.WPF/Controls/WindowBase.cs:23-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 (6 lines × 2) TensorStack.OnnxRuntime.Vision/Pipelines/BackgroundPipeline.cs:90— TensorStack.OnnxRuntime.Vision/Pipelines/BackgroundPipeline.cs:90-95 | TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:174-179 — 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 `TensorStack.OnnxRuntime.Vision/Pipelines/BackgroundPipeline.cs:90` 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 (15 lines × 3) TensorStack.WPF/BaseModel.cs:10— TensorStack.WPF/BaseModel.cs:10-46 | TensorStack.WPF/Controls/BaseControl.cs:11-25 | TensorStack.WPF/Controls/ViewControl.cs:23-90 — 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 `TensorStack.WPF/BaseModel.cs:10` 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. 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 (43 lines × 2) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:454— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:454-496 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:454-496 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 329 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 (34 lines × 2) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:268— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:268-301 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:268-301 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 329 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. 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 (33 lines × 2) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:381— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:381-413 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:381-413 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 329 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. 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 (19 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:50— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:50-68 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:49-67 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:49-67 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (19 lines × 2) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:208— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:208-226 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:208-226 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 329 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. 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 (16 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:383— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:383-398 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:442-457 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:442-457 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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 (12 lines × 2) TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:233— TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:233-244 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:233-244 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 329 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:75— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:75-91 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:74-90 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:74-90 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:153— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:153-158 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:152-157 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:152-157 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (20 lines × 3) TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:298— TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py:298-317 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py:354-374 | TensorStack.HuggingFace/Native/Pipelines/Kandinsky5VideoPipeline.py:354-374 — before extracting anything, compare `TensorStack.HuggingFace/Native/Pipelines/HeliosPipeline.py` and `TensorStack.HuggingFace/Native/Pipelines/Kandinsky5ImagePipeline.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 145 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. 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.
Low cohesion: StableDiffusionContext (LCOM4 4) TensorStack.StableDiffusionCpp/Native/StableDiffusionContext.cs:11— StableDiffusionContext'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.
Unfinished stub — throws NotImplementedException TensorStack.Common/Common/MapCollection.cs:107— `CopyTo` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Fake-async — async method never awaits TensorStack.WPF/Controls/VideoStreamElement.xaml.cs:569— `StopAsync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Sync-over-async (deadlock risk) TensorStack.Media/Video/VideoInput.cs:45— Blocking on a Task with `.Wait()`/`.GetAwaiter().GetResult()` can deadlock (and wastes a thread). Prefer awaiting it: make the caller `async` and `await` instead. Where a synchronous entry point must stay — a public sync API you cannot break, or a process entry point that must not return until the work finishes — the block belongs in ONE documented bridge and never inside code that is already async; and where it already is that bridge, give the wait a TIMEOUT so a hung task fails the call instead of hanging the process.
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×1
Length read from the parsed input is spent without ever being bounded TensorStack.OnnxRuntime.LLM/Pipelines/Whisper/PreProcessor.cs:144— `headerLen` is read from the stream being parsed at line 143 (`ReadUInt16`), then read in bulk from that same stream at line 144 — and nowhere in this method is `headerLen` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). A file the caller did not write therefore chooses the size directly: a value near `int.MaxValue` allocates until the process dies, and a value that overflows the cast to `int` goes negative and throws out of a parser whose failure path was written for malformed input, not for hostile input. Bound `headerLen` against the bytes actually remaining in the stream before spending it.
X18 · Disposal-pattern correctness· Finalizer on a type that owns no unmanaged resource · ×1
Finalizer on a type that owns no unmanaged resource TensorStack.Common/Tensor/Tensor.cs:239— `Tensor` declares a finalizer (line 239), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization.
X18 · Disposal-pattern correctness· Disposes a dependency it does not own · ×1
Disposes a dependency it does not own TensorStack.OnnxRuntime.LLM/Pipelines/DecoderPipeline.cs:432— `_tokenizer` is never created by `DecoderPipeline` — every assignment to it takes a constructor parameter — yet this type disposes it here (line 432). Its declared type `ITokenizer` is an interface, so the instance came from whoever chose and created it, and that owner decides when it ends. Disposing it from here reaches outside this object's lifetime: a dependency shared with the rest of the process is torn down when THIS instance goes away, and the real owner's later `Dispose()` runs a second time on an object already disposed. Drop the call — a type disposes what it constructed, and only that. If this dependency genuinely is exclusive to this instance, construct it here (or take an owned factory) so the ownership is stated in the code rather than assumed.
X20 · Mistyped argument guard· Argument guard throws the exception its own condition disproves · ×1
Argument guard throws the exception its own condition disproves TensorStack.WPF/Image/ImageService.cs:43— The guard on line 42 rejects `filePath` and line 43 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(filePath)` is true of a value that is NOT null: it is satisfied by an EMPTY `filePath`, and on that path `filePath` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows this case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, or split the guard and throw each on its own condition.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×1
Untrusted text written into markup unescaped TensorStack.WPF/Controls/MarkdownElement.js:72— `html` is text this program did not author, and it is written into the text of an element through `insertAdjacentHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Silent fallback default in catch TensorStack.Common/Common/FileHelper.cs:49— `QueueDeleteFile` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.Common/Common/FileHelper.cs:84— `DeleteDirectory` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.Common/Common/FileHelper.cs:229— `TryDelete` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.Common/Common/FileQueue.cs:63— `TryDelete` swallows `IOException` into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.Media/Audio/AudioManager.cs:271— `ReadInfo` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.Media/Audio/AudioManager.cs:299— `ReadInfoAsync` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.OnnxRuntime.LLM/Tokenizers/T5Tokenizer.cs:172— `GetSpecialTokens` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.HuggingFace/Native/LogParser.cs:48— `ParseLog` swallows every exception into `return default;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.WPF/Controls/WindowMainBase.cs:139— `DoDragDropData` swallows every exception into `return DragDropEffects.None;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.WPF/Converters/IntConverter.cs:169— `Convert` swallows every exception into `return 0;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.WPF/Converters/IntConverter.cs:191— `ConvertBack` swallows every exception into `return 0.0;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.WPF/Services/DownloadService.cs:241— `GetTotalSizeFromHeadersAsync` swallows every exception into `return 0L;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.WPF/Services/MarkdownConverter.cs:577— `GetCodeLanguage` swallows every exception into `return null;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch TensorStack.StableDiffusionCpp/Native/StableDiffusionContext.cs:427— `OnPromptImageCallback` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Documentation: no build, run or usage example README.md:1— the repository holds project manifests and neither `README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example TensorStack.Common/README.md:1— `TensorStack.Common` is a package (`PackageId`) and neither `TensorStack.Common/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example TensorStack.Media/README.md:1— `TensorStack.Media` is a package (`PackageId`) and neither `TensorStack.Media/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example TensorStack.OnnxRuntime/README.md:1— `TensorStack.OnnxRuntime` is a package (`PackageId`) and neither `TensorStack.OnnxRuntime/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example TensorStack.OnnxRuntime.LLM/README.md:1— `TensorStack.OnnxRuntime.LLM` is a package (`PackageId`) and neither `TensorStack.OnnxRuntime.LLM/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Documentation: no build, run or usage example TensorStack.WPF/README.md:1— `TensorStack.WPF` is a package (`PackageId`) and neither `TensorStack.WPF/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
Duplicated predicate TensorStack.WPF/Controls/ImageElement.xaml.cs:274— `!IsMouseOver || SplitterVisibility == SplitterVisibility.Manual` appears character-identically in 2 files — TensorStack.WPF/Controls/ImageElement.xaml.cs, TensorStack.WPF/Controls/VideoStreamElement.xaml.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:482— `Math.Abs(diffPosition.X) > Common.DragDistance || Math.Abs(diffPosition.Y) > Common.DragDistance` appears character-identically in 3 files — TensorStack.WPF/Controls/AudioStreamElement.xaml.cs, TensorStack.WPF/Controls/ImageElement.xaml.cs, TensorStack.WPF/Controls/VideoStreamElement.xaml.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate TensorStack.WPF/Controls/AudioStreamElement.xaml.cs:439— `MediaState == MediaState.Pause || MediaState == MediaState.Stop` appears character-identically in 2 files — TensorStack.WPF/Controls/AudioStreamElement.xaml.cs, TensorStack.WPF/Controls/VideoStreamElement.xaml.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs:260— `inputImage.Width <= options.MaxTileSize && inputImage.Height <= options.MaxTileSize` appears character-identically in 2 files — TensorStack.OnnxRuntime.Vision/Pipelines/ExtractorPipeline.cs, TensorStack.OnnxRuntime.Vision/Pipelines/UpscalePipeline.cs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate TensorStack.HuggingFace/Native/Pipelines/AceStepPipeline.py:446— `_control_net_cache and _control_net_name == config.control_net.name` appears character-identically in 26 files — TensorStack.HuggingFace/Native/Pipelines/AceStepPipeline.py, TensorStack.HuggingFace/Native/Pipelines/AnyFlowPipeline.py, TensorStack.HuggingFace/Native/Pipelines/ChromaPipeline.py, TensorStack.HuggingFace/Native/Pipelines/CogVideoXPipeline.py. 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.
Commented-out code TensorStack.WPF/Converters/IntConverter.cs:30— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code TensorStack.WPF/Converters/IntConverter.cs:33— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code TensorStack.WPF/Dialogs/LoadVideoDialog.xaml.cs:317— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
Commented-out code TensorStack.WPF/Dialogs/LoadVideoDialog.xaml.cs:318— A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
P10 · Library API & versioning· Public type used only inside its own library · ×3
Public type used only inside its own library TensorStack.Common/Common/FileQueue.cs:9— `TensorStack.Common.Common.FileQueue` (TensorStack.Common/Common/FileQueue.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `TensorStack.HuggingFace`, `TensorStack.Media`, `TensorStack.OnnxRuntime`, `TensorStack.OnnxRuntime.LLM`, `TensorStack.OnnxRuntime.Vision`, `TensorStack.StableDiffusionCpp`, `TensorStack.WPF`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library TensorStack.Media/Audio/AudioManager.cs:18— `TensorStack.Media.Audio.AudioManager` (TensorStack.Media/Audio/AudioManager.cs:18) is public, and the library's own code uses it, but no other project in this repository uses it (read: `TensorStack.StableDiffusionCpp`, `TensorStack.WPF`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
Public type used only inside its own library TensorStack.OnnxRuntime/ParameterCollection.cs:9— `TensorStack.OnnxRuntime.ParameterCollection` (TensorStack.OnnxRuntime/ParameterCollection.cs:9) is public, and the library's own code uses it, but no other project in this repository uses it (read: `TensorStack.OnnxRuntime.LLM`, `TensorStack.OnnxRuntime.Vision`) and no public member of the library exposes it. Consumers outside this repository are not visible here; if they rely on it, it is API and should be documented as such.
redundant comment TensorStack.OnnxRuntime.LLM/Pipelines/DecoderPipeline.cs:247— "Check Early Stopping" repeats the code it sits on: 3 of its 3 words (check, early, stopping) are already in `if (IsEarlyStopping(activeBeams, options))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
redundant comment TensorStack.WPF/Image/Extensions.cs:174— "Convert to BGRA32 WriteableBitmap" repeats the code it sits on: 5 of its 5 words (convert, bgra, 32, writeable, bitmap) are already in `var convertTarget = new WriteableBitmap(bitmapSource.PixelWidth, bitmapSource.PixelHeight, bitmapSource.DpiX, bitmapSour …`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
Hand-rolled JSON/XML parsing via string slicing TensorStack.WPF/Services/MarkdownConverter.cs:542— A JSON key or XML tag is located in the text with IndexOf/Split and the value cut out around it — a reordered, re-spaced or differently-typed document (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. .NET ships a real parser for it (System.Text.Json, System.Xml.Linq); use it here.
Hand-rolled JSON/XML parsing via string slicing TensorStack.WPF/Services/MarkdownConverter.cs:543— A JSON key or XML tag is located in the text with IndexOf/Split and the value cut out around it — a reordered, re-spaced or differently-typed document (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. .NET ships a real parser for it (System.Text.Json, System.Xml.Linq); use it here.
No ADRs found TensorStack.WPF/TensorStack.WPF.csproj:3— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `TensorStack.WPF/TensorStack.WPF.csproj` makes this repository a deployable product (line 3).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion TensorStack.WPF/TensorStack.WPF.csproj:1— `TensorStack.WPF` overshoots its size bounds (10509 LoC, 160 public types across 9 namespaces). 1 of 8 project(s) overshoot their size bounds, lowering Project Cohesion to 7.7/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No SAST — No static application security testing detected. For this repository's stack, add CodeQL's csharp pack, or a .NET security analyzer package (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation TensorStack.Common/TensorStack.Common.csproj:8— `TensorStack.Common/TensorStack.Common.csproj` 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 changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X2 · Cancellation propagation· Not all async methods take a CancellationToken · ×1
Not all async methods take a CancellationToken — Only 93/210 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
Nullable reference types not enabled everywhere — 0/8 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
doc comments repeat the names TensorStack.Common/Audio/AudioInputBase.cs:14— 236 of 287 documented parameters and 45 of 249 summaries in `TensorStack.Common` only repeat the member or parameter name (e.g. "The audio tensor." for `audioTensor`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names TensorStack.HuggingFace/HuggingFaceBackend.cs:29— 33 of 36 documented parameters and 15 of 50 summaries in `TensorStack.HuggingFace` only repeat the member or parameter name (e.g. "The base directory." for `baseDirectory`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names TensorStack.Media/Audio/AudioInput.cs:20— 212 of 244 documented parameters and 12 of 97 summaries in `TensorStack.Media` only repeat the member or parameter name (e.g. "The filename." for `filename`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names TensorStack.OnnxRuntime/DeviceManager.cs:45— 74 of 118 documented parameters and 34 of 128 summaries in `TensorStack.OnnxRuntime` only repeat the member or parameter name (e.g. "The environment options." for `environmentOptions`). 1 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
doc comments repeat the names TensorStack.OnnxRuntime.LLM/Cache/IKVCache.cs:23— 289 of 362 documented parameters and 61 of 249 summaries in `TensorStack.OnnxRuntime.LLM` only repeat the member or parameter name (e.g. "The current values." for `currentValues`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names TensorStack.OnnxRuntime.Vision/Common/BackgroundOptions.cs:8— 104 of 127 documented parameters and 34 of 136 summaries in `TensorStack.OnnxRuntime.Vision` only repeat the member or parameter name (e.g. "Default BackgroundOptions." for `BackgroundOptions`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names TensorStack.StableDiffusionCpp/Native/NativeApi.cs:90— 192 of 262 documented parameters and 23 of 173 summaries in `TensorStack.StableDiffusionCpp` only repeat the member or parameter name (e.g. "The status." for `status`). Delete the restating tags, or add what the name does not say.
doc comments repeat the names TensorStack.WPF/Common.cs:127— 97 of 227 documented parameters and 86 of 377 summaries in `TensorStack.WPF` only repeat the member or parameter name (e.g. "The source." for `source`). Delete the restating tags, or add what the name does not say.
Outdated: OpenCvSharp5 — OpenCvSharp5 5.0.0.20261109 → 5.1.0.20261115 available (referenced by TensorStack.Media).
Outdated: OpenCvSharp5.runtime.win — OpenCvSharp5.runtime.win 5.0.0.20261109 → 5.1.0.20261115 available (referenced by TensorStack.Media).
Outdated: SkiaSharp — SkiaSharp 4.155.0 → 4.156.1 available (referenced by TensorStack.Media).
Outdated: Microsoft.ML.OnnxRuntime.Managed — Microsoft.ML.OnnxRuntime.Managed 1.30.0 → 1.32.0 available (referenced by TensorStack.OnnxRuntime).
Outdated: Microsoft.ML.Tokenizers — Microsoft.ML.Tokenizers 2.0.0-preview.1.25125.4 → 3.0.0 available (referenced by TensorStack.OnnxRuntime.LLM).
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.
nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 2 file(s) — `TensorStack.HuggingFace/HuggingFacePipeline.cs`, `TensorStack.WPF/Services/MarkdownConverter.cs` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1eb27-e01b-78b6-83d1-7493024a60db · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 18 · Warnings: 347 · Recommendations: 46 · Info: 13 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 20:17 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.