Class BowireContractMatrix
- Namespace
- Kuestenlogik.Bowire.Contracts
- Assembly
- Kuestenlogik.Bowire.Contracts.dll
Builds the consumer × provider result matrix (#364) from a set of
contract-verification reports. Pure aggregation — no I/O — so the
endpoint, the CLI contract matrix command and the MCP tool all
project the same grid from whatever set of reports they gathered.
public static class BowireContractMatrix
- Inheritance
-
BowireContractMatrix
- Inherited Members
Methods
Build(IEnumerable<ContractVerificationReport>)
Assemble a matrix from reports. Rows and columns
are the distinct consumer and provider names across all reports.
When more than one report exists for the same pair the most recent
(by StartedAt) wins, so a
re-run supersedes an earlier verdict rather than duplicating it.
public static ContractMatrix Build(IEnumerable<ContractVerificationReport> reports)
Parameters
reportsIEnumerable<ContractVerificationReport>
Returns
StatusText(ContractCellStatus)
The wire spelling of a cell status.
public static string StatusText(ContractCellStatus status)
Parameters
statusContractCellStatus
Returns
ToWirePayload(ContractMatrix)
The canonical JSON shape of a matrix, shared by every surface that
emits one: GET /api/contracts/matrix, bowire contract
matrix --json and the bowire.contract.matrix MCP tool.
It exists so the cell status is the string the rail JS switches on
("pass" / "fail" / "notRun") on every surface. Serialising
ContractCellStatus directly emits the raw enum ordinal
("status": 1), which is what the CLI did before #364's
end-to-end check caught it — a script could not treat CLI output and
API output alike.
public static object ToWirePayload(ContractMatrix matrix)
Parameters
matrixContractMatrix