IF Commons GitHub

pure/tier

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

The tier a harness claims (commons 0001-quality-evidence FR-040): Tier0 (evidence exists: FR-018 to FR-025), Tier1 (the system reports itself: FR-026 to FR-039) or Tier2 (people see and prove: FR-037 to FR-044). A claim is judged against the requirements of the tier and of the tiers below it, each held by a mechanism of the proof register (anything but none): where one is not, the claim is refused and the requirement named.

import { judgeTier } from "./tier.ts";
// judgeTier("Tier1", parseRegister(text)).claimed === false

Source: commons/quality/src/pure/tier.ts

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

Tiertypeno test imports it
type Tier = "Tier0" | "Tier1" | "Tier2";

The tiers a harness may claim (ifqs:QualityTier).

TIERSconstno test imports it
const TIERS: readonly Tier[]

The tiers in order.

isTierfunctionno test imports it
function isTier(text: string): text is Tier

Whether a text is a tier.

tierRequirementsfunction
function tierRequirements(tier: Tier): readonly string[]

The requirements a tier itself states (without those of the tiers below it).

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

TierJudgementtypeno test imports it
type TierJudgement = { readonly tier: Tier; /** Whether every requirement of the tier and of those below it is held … (630 characters)
type TierJudgement = {
  readonly tier: Tier;
  /** Whether every requirement of the tier and of those below it is held by a mechanism and, for a regulated harness in production, proved at the grade it needs. */
  readonly claimed: boolean;
  /** The requirements of the tier and below that are held by none. */
  readonly unmet: readonly string[];
  /** Where a regulated harness is in production: the requirements held by a mechanism whose proof is below the grade needed (FR-016), with the grade they have. */
  readonly underGrade: readonly { readonly requirement: string; readonly grade: Grade; readonly needed: Grade }[];
};

What a claim of a tier comes to.

TierProoftypeno test imports it
type TierProof = {
  readonly judgements: readonly Judgement[];
  readonly declaration: Declaration | undefined;
  readonly today: string;
};

What a regulated harness in production is also judged on: the judgements of its requirements, its declaration and the day (FR-016).

judgeTierfunction
function judgeTier(tier: Tier, register: readonly RegisterRow[], proof?: TierProof | undefined): TierJudgement

A claim judged against the register (FR-040): a requirement the register does not list, or lists with none, is not met. Where proof is given and the harness declares a regulated domain and production (today is on or after its production day), a requirement held by a mechanism must also be proved at the grade gradeNeeded asks (E4: FR-016), or the claim is refused and the requirement named with the grade it has. Every other harness is judged by the register alone.

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

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