versions.isReleaseTierfunctionno test imports itfunction isReleaseTier(text: string): text is "Tier0" | "Tier1" | "Tier2"Whether a text is a tier a harness may name.
The release gate (commons 0026-works-versioning FR-026): a harness that declares a regulated domain (0020-ifccm) releases only on the evidence tier it declares (releaseTier of its declaration), and every release records the tier it was released on.
Pure: the declaration and the tier judged (by quality tier, 0021-ifqs) are arguments, so this module imports nothing of the quality system. A regulated harness whose declaration names no releaseTier is refused; so is one whose tier was not judged or is below the declared one. A harness that declares no regulated domain is not held to a tier and the release records the tier judged, or says it was not judged.
import { releaseGate } from "./gate.ts";
releaseGate({ regulatedDomains: ["DeviceQuality"], releaseTier: "Tier2" }, "Tier1").kind; // "refused"versions.isReleaseTierfunctionno test imports itfunction isReleaseTier(text: string): text is "Tier0" | "Tier1" | "Tier2"Whether a text is a tier a harness may name.
versions.releaseGatefunctionno test imports itfunction releaseGate(declaration: Declaration | undefined, judged: "Tier0" | "Tier1" | "Tier2" | undefined): GateOutcomeThe gate: a regulated harness releases only at the tier it declares or above, and one that declares none, or whose tier was not judged, is refused (FR-026).
versions.tierAtLeastfunctionno test imports itfunction tierAtLeast(judged: "Tier0" | "Tier1" | "Tier2", declared: "Tier0" | "Tier1" | "Tier2"): booleanWhether judged is at least declared.
versions.GateOutcometypeno test imports ittype GateOutcome =
| {
readonly kind: "allowed";
/** The tier the release records: the tier judged, or undefined where none was. */ readonly tier: ReleaseTier | undefined;
}
| { readonly kind: "refused"; readonly reason: string };What the gate says of a release.
isReleaseTierfunctionfunction isReleaseTier(text: string): text is "Tier0" | "Tier1" | "Tier2"Whether a text is a tier a harness may name.
releaseGatefunctionfunction releaseGate(declaration: Declaration | undefined, judged: "Tier0" | "Tier1" | "Tier2" | undefined): GateOutcomeThe gate: a regulated harness releases only at the tier it declares or above, and one that declares none, or whose tier was not judged, is refused (FR-026).
tierAtLeastfunctionno test imports itfunction tierAtLeast(judged: "Tier0" | "Tier1" | "Tier2", declared: "Tier0" | "Tier1" | "Tier2"): booleanWhether judged is at least declared.
GateOutcometypeno test imports ittype GateOutcome =
| {
readonly kind: "allowed";
/** The tier the release records: the tier judged, or undefined where none was. */ readonly tier: ReleaseTier | undefined;
}
| { readonly kind: "refused"; readonly reason: string };What the gate says of a release.