IF Commons GitHub

logical/guarantees

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-toolchain-logical FR-001, 0003-toolchain-logical FR-002

What a dialect of tools says it can guarantee, as data, and whether that meets the control toolIntegrity of a fleet's assurance. A dialect of artifacts and a dialect of a package manager differ a great deal in how exactly they pin and how they check what they install, and a fleet's assurance says how much it needs; this is where the two are compared.

import { meetsIntegrity } from "./guarantees.ts";
// meetsIntegrity("exact-hashed", { pin: "rolling", integrity: "none", ... }) lists the reasons it does not

Source: commons/toolchain/src/logical/guarantees.ts

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

Integritytypeno test imports it
type Integrity = "hash" | "signature" | "none";

How a dialect checks what it installs.

ToolGuaranteestype
type ToolGuarantees = { /** How exactly it pins. */ readonly pin: PinPolicy; readonly integrity: Integrity; /** … (465 characters)
type ToolGuarantees = {
  /** How exactly it pins. */
  readonly pin: PinPolicy;
  readonly integrity: Integrity;
  /** The scopes it can install in. */
  readonly scopes: readonly Scope[];
  /** The platforms it can reach. */
  readonly platforms: readonly Platform[];
  /** Whether it takes the download of a pin or the packages of its manager. */
  readonly binds: "pin" | "package";
  /** Whether it can build from source. */
  readonly sourceBuild: boolean;
};

What a dialect of tools guarantees.

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

ToolDialecttype
type ToolDialect = { readonly id: DialectId; readonly manager?: ManagerId; readonly guarantees: ToolGuarantees };

A dialect of tools: its id, the package manager of the ontology it drives where it drives one, and what it guarantees.

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

pinOfControlfunctionno test imports it
function pinOfControl(control: "exact-hashed" | "release-line" | "rolling"): PinPolicy

How strictly a control asks tools to be pinned.

pinRankfunctionno test imports it
function pinRank(pin: PinPolicy): number

The rank of a pin policy: 0 is the least strict.

meetsIntegrityfunction
function meetsIntegrity(control: "exact-hashed" | "release-line" | "rolling", g: ToolGuarantees): readonly string[]

Every reason a dialect does not meet the control toolIntegrity; none where it does.

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

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