Class ContractResultStore

Namespace
Kuestenlogik.Bowire.Contracts
Assembly
Kuestenlogik.Bowire.Contracts.dll

On-disk store of contract-verification results (#364), under .bowire/contract-results/. One JSON file per consumer × provider pair, overwritten by the newest run.

This is what makes the matrix possible without the workbench reaching out on its own: bowire contract verify (locally or in CI) writes results here, and the matrix endpoint only ever reads them. Rendering a grid never triggers an outbound call to someone's provider — outbound stays opt-in and explicit, exactly as on the CLI.

public static class ContractResultStore
Inheritance
ContractResultStore
Inherited Members

Fields

DirectoryName

Directory name under the project's .bowire folder.

public const string DirectoryName = "contract-results"

Field Value

string

Methods

LoadAllAsync(string?, CancellationToken)

Read every stored result. Missing directory yields an empty list — an operator who has never run a verification sees an empty matrix, not an error. Individual unreadable / malformed files are skipped so one bad file can't blank the whole grid.

public static Task<List<ContractVerificationReport>> LoadAllAsync(string? rootPath = null, CancellationToken ct = default)

Parameters

rootPath string
ct CancellationToken

Returns

Task<List<ContractVerificationReport>>

ResolveDirectory(string?)

Resolve the results directory for rootPath (the project root; defaults to the current directory).

public static string ResolveDirectory(string? rootPath = null)

Parameters

rootPath string

Returns

string

SaveAsync(ContractVerificationReport, string?, CancellationToken)

Write report as the latest result for its consumer × provider pair, creating the directory when needed. Returns the file written.

public static Task<string> SaveAsync(ContractVerificationReport report, string? rootPath = null, CancellationToken ct = default)

Parameters

report ContractVerificationReport
rootPath string
ct CancellationToken

Returns

Task<string>