IF Commons GitHub

logical/conformance/signing

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0010-anyfs-merge-signing FR-001, 0010-anyfs-merge-signing FR-002

The conformance suite of signed deltas: the laws a replica that takes signed changes obeys, as cases that run against replicas a backend makes with a trust the suite gives them. A delta signed by a key of the roster of its replica is taken; one that is not signed, one whose signature is of another delta, one signed by another replica's key or under a key id that is not its own signature's, one from a replica that is not on the list it must also be on, and one signed under a key whose window has not begun or has ended are refused each with the reason of its own; one taken twice has the effect of once. Each failure is a sentence. The suite is held by a test that runs it against replicas that check nothing and sees each of them fail.

import { runSigningConformance } from "./signing.ts";
// const report = await runSigningConformance(async (ids, trusts) => replicasOfMyBackend(ids, trusts))

Source: commons/anyfs/src/logical/conformance/signing.ts

2 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

runSigningConformancefunction
function runSigningConformance(make: MakeSigned): Promise<readonly SigningReport[]>

Runs the cases against replicas a backend makes, and says which failed and how.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

MakeSignedtype
type MakeSigned = (replicas: readonly ReplicaId[], trusts: readonly Trust[]) => Promise<readonly MergeFace[]>;

What a backend gives the suite: replicas with these identities, the first taking changes by the first trust, and so on.

Imported by 5 tests of the run (5 passed, 0 failed): the library's results

SigningReporttypeno test imports it
type SigningReport = { readonly id: string; readonly failure?: string };

The report of one case.

Titles, headings, exports, tables, columns and requirements. Esc closes.