IF Commons GitHub

trust/host

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-quality-evidence FR-052

The Trust page made from a repository's evidence and checked against the files on disk (commons 0001-quality-evidence FR-052, FR-059): the page and its JSON are generated from one Collected (the evidence read once, assessor/host.ts), and --check fails where either file differs from what the evidence makes, a page edited by hand included.

Source: commons/quality/src/trust/host.ts

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

TrustRequesttypeno test imports it
type TrustRequest = { readonly harness: string; readonly audience: Audience; readonly rules: RedactionRules; rea… (699 characters)
type TrustRequest = {
  readonly harness: string;
  readonly audience: Audience;
  readonly rules: RedactionRules;
  readonly scopeNote?: string;
  readonly notCovered?: readonly string[];
  /** The rate at which a person samples the agents' reviews, in a thousandth, that the harness states (0001-quality-evidence FR-044). */
  readonly agentRatePermille?: number;
  /**
   * What a requirement says at the tested revision (0001-quality-evidence FR-068), read from the specifications by `readRequirementTexts`: the Assessor and
   * Internal pages show it beside a nonconformance, the Public page never does. None where the harness gives none.
   */
  readonly requirementText?: RequirementText;
};

What a page is made with besides the evidence.

TrustPagetype
type TrustPage = { readonly view: TrustView; readonly html: string; readonly json: string };

A page: its view, its HTML and its JSON.

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

generateTrustfunction
function generateTrust(c: Collected, request: TrustRequest): Result<TrustPage, string>

The page of an audience made from what was collected (FR-052, FR-057), or why it is refused (FR-055).

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

driftOffunctionno test imports it
function driftOf(page: TrustPage, files: { readonly html?: string | undefined; readonly json?: string | undefined; }): Promise<readonly string[]>

The files on disk that differ from what the evidence makes: each named with what is wrong (FR-052). Empty where the page and its JSON are current.

checkTrustfunction
function checkTrust(page: TrustPage, files: { readonly html?: string | undefined; readonly json?: string | undefined; }): Promise<Result<true, string>>

Whether the page the evidence makes is the one on disk, as a result.

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

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