IF Commons GitHub

Converge plugin: the commands

0002Active

0002-converge-command · owner if · domain commons

Requirements

FR-001checkpassing

The plugin MUST contribute the branch converge with the verbs plan and apply to the program it is given (archon by default), take a dialect and a function that gives, for an asset and the options the person gave, what must be true of it and how to reach it, or a refusal with a code, an exit and the words; a refusal MUST end the command with that exit and name that code, and the options of the fleet's own MUST reach the function.

Enforced (check): .github: cd commons/archon-converge && bun run verify — suite/command.test.ts

Proved by: archon-converge/suite/command.test.ts

Written in: archon-converge/src/config.ts, archon-converge/src/mod.ts

Tests: passed: suite/command.test.ts the plugin composes into the command with the verbs plan and apply, and an asset that is n

FR-002checkpassing

plan MUST observe the machine by reading only (never a change and nothing written on it), make the order, the plan and the render, say each change, name each requirement that no dialect carries (never leaving one out silently) and print the hash of the plan, ending with 4 where there is something to approve and 0 where the plan is empty.

Enforced (check): .github: cd commons/archon-converge && bun run verify — suite/command.test.ts

Proved by: archon-converge/suite/command.test.ts

Written in: archon-converge/src/commands.ts, archon-converge/src/run.ts

Tests: passed: suite/command.test.ts through the command on a real machine with ansible-core: plan with a hash and what no dial

FR-003checkpassing

apply MUST carry out exactly the plan of the hash it is given and refuse another (the plan changed) with nothing changed, refuse a plan that removes something unless --allow-removal yes is given, check that the tool on the machine is the version the dialect pins, put the render on the machine and run the steps with the executor of Headless.

Enforced (check): .github: cd commons/archon-converge && bun run verify — suite/command.test.ts

Proved by: archon-converge/suite/command.test.ts

Written in: archon-converge/src/commands.ts, archon-converge/src/run.ts

Tests: passed: suite/command.test.ts through the command on a real machine with ansible-core: plan with a hash and what no dial

FR-004checkpassing

After an apply the plan MUST be made again and, where it is not empty, the command MUST end with 1 and say so.

Enforced (check): .github: cd commons/archon-converge && bun run verify — suite/command.test.ts

Proved by: archon-converge/suite/command.test.ts

Written in: archon-converge/src/commands.ts, archon-converge/src/run.ts

Tests: passed: suite/command.test.ts through the command on a real machine with ansible-core: plan with a hash and what no dial

FR-005checkpassing

Every change of a machine MUST be by the steps of the plan that the hash covers; a change made by hand MUST be found again by the next plan, with the one change.

Enforced (check): .github: cd commons/archon-converge && bun run verify — suite/command.test.ts

Proved by: archon-converge/suite/command.test.ts

Written in: archon-converge/src/commands.ts, archon-converge/src/run.ts

Tests: passed: suite/command.test.ts through the command on a real machine with ansible-core: plan with a hash and what no dial

FR-006checkpassing

The subject MAY say the family of the machine and a dialect of its own (the family and the version of the tool of this machine, which the fleet gives from the platform it declares or reads, commons linux-observe 0004-linux-observe-platform): where it does, the observation MUST read each package by the program of the family and the render, the steps and the check of the version of the tool MUST be those of that dialect, so that one command converges machines of different families, each by what it is.

Enforced (check): .github: cd commons/archon-converge && bun run verify — suite/command.test.ts

Proved by: archon-converge/suite/command.test.ts

Tests: passed: suite/command.test.ts a machine of another family is converged by its own dialect and observed by the program of

Acceptance scenarios

  1. Given a machine and its requirements, When plan is run and then apply with its hash, Then the machine is as declared and the next plan is empty, per FR-002 to FR-004.

Out of scope

  • Which machines there are, where the requirements are kept and who owns a machine's convergence: the fleet's.

Edge cases

  • A kind of resource that no dialect carries is named in the plan as not converged, per FR-002.

Assumptions

  • The tool of the dialect is on the machine already (the plugin installs nothing).

Open questions

  • None.

Key entities

  • Convergence, Plan hash, Subject.

Success criteria

SC-001success criterion

A machine is converged to what its requirements declare only by the plan that a person approved by its hash, and the next plan is empty.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

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