IF Commons GitHub

run

Written to: 4 requirements: 4 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-converge-command FR-002, 0002-converge-command FR-003, 0002-converge-command FR-004, 0002-converge-command FR-005

The convergence of one asset: what is observed on the machine (by reading only), the order of the requirements, the plan between them, what the dialect renders and the steps it gives, the plan of steps of Headless with its hash, and the run of those steps, approved by that hash. After an apply the plan is made again and must be empty. Archon orchestrates and the dialect converges: nothing here changes a machine but by the steps of the plan.

import { describe } from "./run.ts";
// describe(planned) is the text a person reads before approving a plan

Source: commons/archon-converge/src/run.ts

Mutation score of this file: 62.2% (65 of 172 changes to its code were not noticed by a test).

0 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.

Plannedtypeno test imports it
type Planned = {
  readonly plan: Plan;
  readonly exec: ExecutionPlan | undefined;
  readonly hash: string | undefined;
  readonly rendered: ReadonlyMap<string, string>;
  readonly digest: string;
  readonly unexpressed: readonly Requirement[];
};

What a plan of convergence is: the entries, the steps and their hash.

Madetypeno test imports it
type Made = { readonly dialect: Dialect; readonly asset: string; readonly subject: ConvergeSubject };

What a plan is made with.

planForfunctionno test imports it
function planFor(m: Made): Promise<Result<Planned, string>>

The plan of an asset: observe, order, plan, render and steps; or why it cannot be made.

describefunctionno test imports it
function describe(p: Planned): string

The text a person reads before approving a plan: each change, what no dialect carries, and the hash.

deliverfunctionno test imports it
function deliver(executor: Executor, root: string, p: Planned, elevate: readonly string[]): Promise<Result<true, string>>

Puts the render on the machine, in the folder named by its digest.

checkToolVersionfunctionno test imports it
function checkToolVersion(executor: Executor, elevate: readonly string[], argv: readonly string[], dialect: Dialect): Promise<Result<string, string>>

The version of the tool on the machine must be the one the dialect pins.

Appliedtypeno test imports it
type Applied = { readonly result: ExecutionResult; readonly output: readonly string[]; readonly after: Planned | undefined };

What a run came to.

applyPlanfunctionno test imports it
function applyPlan(m: Made & { readonly renderRoot: string; readonly toolVersion: readonly string[]; readonly approvedHash: string; readonly destroy: boolean; readonly onEvent?: ((e: ExecEvent) => void) | undefined; }): Promise<Result<Applied, string>>

Applies an approved plan, then makes the plan again: an apply that leaves a plan that is not empty is reported as such.

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