Tiertypeno test imports ittype Tier = "Tier0" | "Tier1" | "Tier2";The tiers a harness may claim (ifqs:QualityTier).
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 === falseTiertypeno test imports ittype Tier = "Tier0" | "Tier1" | "Tier2";The tiers a harness may claim (ifqs:QualityTier).
TIERSconstno test imports itconst TIERS: readonly Tier[]The tiers in order.
isTierfunctionno test imports itfunction isTier(text: string): text is TierWhether a text is a tier.
tierRequirementsfunctionfunction tierRequirements(tier: Tier): readonly string[]The requirements a tier itself states (without those of the tiers below it).
TierJudgementtypeno test imports ittype 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 ittype 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).
judgeTierfunctionfunction judgeTier(tier: Tier, register: readonly RegisterRow[], proof?: TierProof | undefined): TierJudgementA 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.