| License | Apache-2.0 |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
Conformance.Rows
Description
The complete consumer-row inventory from rows.json: id, group,
requirement, source, expected outcome and declared plan. list
prints it; validateInventory enforces the denominator — 48 rows,
47 owned — so a truncated inventory fails loudly instead of printing
a smaller-but-plausible table.
executed is not a value rows.json can carry: the declared field
is the coverage plan (uncovered, bound-elsewhere,
out-of-scope) and the parser rejects executed. A row prints as
executed only when effectiveState finds a matching run receipt
(see Conformance.Receipt).
Synopsis
- data Row = Row {
- rowId :: !Text
- rowGroup :: !Text
- rowRequirement :: !Text
- rowSource :: !Text
- rowExpected :: !Text
- rowState :: !RowState
- rowNote :: !(Maybe Text)
- rowEvidence :: !(Maybe Text)
- data RowState
- data ShownState
- expectedRowCount :: Int
- ownedDenominator :: Int
- loadRows :: FilePath -> IO (Either String [Row])
- validateInventory :: [Row] -> Either String [Row]
- effectiveState :: Text -> [Receipt] -> Row -> ShownState
- renderInventory :: Text -> [Receipt] -> [Row] -> Text
- renderRow :: (Row, ShownState) -> Text
Documentation
One consumer conformance row.
Constructors
| Row | |
Fields
| |
Instances
| FromJSON Row Source # | |
Defined in Conformance.Rows | |
| Show Row Source # | |
Defined in Conformance.Rows | |
| Eq Row Source # | |
Defined in Conformance.Rows | |
| Ord Row Source # | |
A row's declared coverage plan. executed is unrepresentable
here by construction: only a run receipt can establish it.
Constructors
| Uncovered | |
| BoundElsewhere | |
| OutOfScope |
Instances
| FromJSON RowState Source # | |
Defined in Conformance.Rows | |
| Show RowState Source # | |
Defined in Conformance.Rows | |
| Eq RowState Source # | |
Defined in Conformance.Rows | |
| Ord RowState Source # | |
Defined in Conformance.Rows | |
data ShownState Source #
What list prints for a row: executed iff a receipt for it
exists, matches the current base and agrees with the model; partial for
a partial receipt; the verdict a receipt recorded when it is neither (a
held, divergent or ruled-on run is never a pass); else the declared plan.
Constructors
| ShownExecuted | |
| ShownPartial | |
| ShownRecorded Verdict | |
| ShownPlanned RowState |
Instances
| Show ShownState Source # | |
Defined in Conformance.Rows Methods showsPrec :: Int -> ShownState -> ShowS Source # show :: ShownState -> String Source # showList :: [ShownState] -> ShowS Source # | |
| Eq ShownState Source # | |
Defined in Conformance.Rows Methods (==) :: ShownState -> ShownState -> Bool Source # (/=) :: ShownState -> ShownState -> Bool Source # | |
expectedRowCount :: Int Source #
Total rows in rows.json: the 47 owned consumer rows (including
historical-permissionless-fold, the F-002 permissionless-folder regression, register-active-key, #173's
insertActive fold and its two refusal fixtures, retire-active-key, #177's
updateTerminal retirement and its two refusal fixtures, reject-and-retract-refund-controls,
issue #258's reject and retract with their tampered refunds, and reject-inside-processing-and-retraction-windows,
issue #320's early rejection in two windows) plus checkpoint-and-treasury-policy,
cardano-keri's checkpoint policy, recorded as out-of-scope so the
boundary is visible instead of forgotten. The original broader retirement
requirement stays present; permanent-retire-active-key is a separate requirement.
ownedDenominator :: Int Source #
Rows Singular owns and must eventually evidence. Out-of-scope rows (checkpoint-and-treasury-policy) are carried for the boundary, never counted.
validateInventory :: [Row] -> Either String [Row] Source #
Enforce the denominator: exactly expectedRowCount rows of which
exactly ownedDenominator are owned, unique ids, non-empty groups.
A count over a silently shortened set is a lower bound wearing the
denominator's name, so short is an error, not a smaller table.
effectiveState :: Text -> [Receipt] -> Row -> ShownState Source #
renderInventory :: Text -> [Receipt] -> [Row] -> Text Source #
Render the full inventory table plus the state summary. The summary counts effective states and names the owned denominator with the out-of-scope rows excluded from it.
renderRow :: (Row, ShownState) -> Text Source #