IF Commons GitHub

logical/bind

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-objective-evidence FR-005

Evidence from what a tool checked (0002-objective-evidence FR-005): the results of a machine's policies, each bound to the objectives it gives evidence for, become records of the method test by a tool, one per bound objective. A policy that is waiting (the machine was not observed) gives no evidence; one that warns gives none either, because a warning is not a pass; an accepted risk is a person's decision and gives none from a tool. A passing or failing result gives a record, and no record of a tool determines an objective.

import { evidenceFromPolicies } from "./bind.ts";
evidenceFromPolicies([], {}, { framework: "f", at: "2026-11-21T00:00:00Z", tool: "probe", asset: "athens" }); // []

Source: commons/assessment/src/logical/bind.ts

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

logical.PolicyResulttypeno test imports it
type PolicyResult = { readonly id: string; readonly status: "pass" | "fail" | "warn" | "accepted" | "waiting" };

A policy's result as a check of an asset gives it.

logical.Bindingstypeno test imports it
type Bindings = Readonly<Record<string, readonly string[]>>;

Which objectives each policy gives evidence for, by policy id.

logical.Runtypeno test imports it
type Run = { readonly framework: string; readonly at: string; readonly tool: string; readonly asset: string; readonly validUntil?: string };

The context of one run of the checks.

logical.evidenceFromPoliciesfunctionno test imports it
function evidenceFromPolicies(results: readonly PolicyResult[], bindings: Readonly<Record<string, readonly string[]>>, run: Run): readonly Evidence[]

The evidence a run of the policies gives, in a stable order.

PolicyResulttypeno test imports it
type PolicyResult = { readonly id: string; readonly status: "pass" | "fail" | "warn" | "accepted" | "waiting" };

A policy's result as a check of an asset gives it.

Bindingstypeno test imports it
type Bindings = Readonly<Record<string, readonly string[]>>;

Which objectives each policy gives evidence for, by policy id.

Runtypeno test imports it
type Run = { readonly framework: string; readonly at: string; readonly tool: string; readonly asset: string; readonly validUntil?: string };

The context of one run of the checks.

evidenceFromPoliciesfunction
function evidenceFromPolicies(results: readonly PolicyResult[], bindings: Readonly<Record<string, readonly string[]>>, run: Run): readonly Evidence[]

The evidence a run of the policies gives, in a stable order.

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

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