ProtoTest.Diagnosis 1.1.6

dotnet add package ProtoTest.Diagnosis --version 1.1.6
                    
NuGet\Install-Package ProtoTest.Diagnosis -Version 1.1.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ProtoTest.Diagnosis" Version="1.1.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ProtoTest.Diagnosis" Version="1.1.6" />
                    
Directory.Packages.props
<PackageReference Include="ProtoTest.Diagnosis" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ProtoTest.Diagnosis --version 1.1.6
                    
#r "nuget: ProtoTest.Diagnosis, 1.1.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ProtoTest.Diagnosis@1.1.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ProtoTest.Diagnosis&version=1.1.6
                    
Install as a Cake Addin
#tool nuget:?package=ProtoTest.Diagnosis&version=1.1.6
                    
Install as a Cake Tool

ProtoTest.Diagnosis

Preview: the surface can change before 1.2.

Reads one .prototrace run and states the deterministic causal summary: which tests failed and why, what the failing operation carried and changed, and what the report published.

dotnet add package ProtoTest.Diagnosis
var diagnosis = ProtoDiagnosis.Read("TestResults/Shop.prototrace");
foreach (var failure in diagnosis.Failures)
{
    Console.WriteLine($"{failure.Outcome}: {failure.Name} ({failure.Rule})");
}

The rules are the same ones prototest summary and the MCP get_diagnosis tool use, so a CI log, an agent and the viewer select one failure and tell one story:

  • A failed assert.* operation with recorded checks or shape.mismatches is an assertion; the cause is the mismatch list and the subject the operation is about.
  • A failed operation with an error (a client, lifecycle or protocol call) is an operation error.
  • A runner-reported failure without a recorded operation error is a runner failure.
  • A finding explains a test the runner did not fail (partial outcomes).
  • A failed run gate explains a red run in the gates list.

Anything else is unexplained, with the run and test ids in the document and a pointer to the viewer.

ProtoDiagnosis.Review says what each test proves: a test body with no check, a call no check looked at, and time with no recorded operation. Each finding names the next step.

foreach (var test in ProtoDiagnosis.Review("TestResults/Shop.prototrace").Tests.Where(t => !t.Clean))
{
    Console.WriteLine($"{test.Name}: {string.Join(", ", test.Findings.Select(f => f.Rule))}");
}

ProtoDiagnosis.ReadContext(archive, testId) returns what an agent reads for one failure: the selected operation with its attributes, the ancestor chain and the nearest call, section previews, the embedded source snippet, the test's artifacts, the state changes the operation caused and the report rows the operation touched.

Limits

  • Deterministic and offline: one report and one archive in, one JSON document out. No LLM, no network, no coverage re-derivation from spans, no reconstruction of evidence that was not recorded. The same archive produces byte-identical JSON.
  • Coverage, gates and findings come from the JSON report a ProtoTest.Reporting sink embedded. When the report is absent, coverage is omitted with the reason and gates and findings are read from the run's own trace records; a gate verdict from the trace carries its details as the one recorded string.
  • Hard caps bound every document and context: 25 mismatches, 10 findings, 10 gates, 10 artifacts, 4,000-character messages, 4 KB section previews, 41 source-snippet lines, 32 ancestors, 10 state items, 16 sections and 10 coverage rows. Artifact content is only read on request and only up to a 64 KB preview.
  • An archive read from a stream has no file to read, so its state, sources and artifact content are absent with that reason; open the file instead.

ProtoDiagnosisJson.ToJson is the one JSON rendering the MCP tools and the feedback channels share, and ProtoTraceSummaryText.Write is the plain-text rendering prototest summary prints.

Learn more

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ProtoTest.Diagnosis:

Package Downloads
ProtoTest.Feedback

Posts a ProtoTest run's failure digest where a pull request reads it: a comment with the trace link, check annotations, and a webhook for a machine consumer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.6 43 10/4/2026
1.1.5 46 10/3/2026
1.1.4 46 10/3/2026
1.1.3 42 10/3/2026
1.1.2 37 10/3/2026
1.1.1 40 10/2/2026
1.1.0 61 10/2/2026