IF Commons GitHub

Linux observation: observing a machine

0003Active

0003-linux-observe-observe · owner if · domain commons

Requirements

FR-001checkpassing

Observation MUST run only programs that read (getent, id, stat, cat, systemctl is-active, systemctl is-enabled, dpkg-query, rpm, pacman, readlink and uname), MUST put the prefix that raises rights in front of each where one is given, MUST give an entry only for a resource that is there, and MUST skip a requirement whose desired state is not an object.

Enforced (check): .github: cd commons/linux-observe && bun run verify — suite/observe.test.ts

Proved by: linux-observe/suite/observe.test.ts

Written in: linux-observe/src/physical/observe.ts

Tests: passed: suite/observe.test.ts the whole observation runs only programs that read, puts the prefix that raises rights in

FR-002checkpassing

On a real machine, one made as an order declares MUST be observed equal to what is declared, one that differs MUST be observed as it is, and a resource that is not there MUST have no entry; the observation MUST change nothing.

Enforced (check): .github: cd commons/linux-observe && bun run verify — suite/observe.test.ts

Proved by: linux-observe/suite/observe.test.ts

Written in: linux-observe/src/physical/observe.ts

Tests: passed: suite/observe.test.ts on a real machine: what is made as declared is observed equal to what is declared, what di

FR-003checkpassing

A package MUST be read by the program of the family of the machine (0004-linux-observe-platform): dpkg-query on debian, rpm -q on rhel and suse and pacman -Q on arch; a package that is not installed MUST have no entry on every family; a setting of the system MUST be read from the file of its family (the time zone from /etc/localtime everywhere, the locale from /etc/default/locale on debian and /etc/locale.conf on the others), and the keyboard layout, which only debian keeps as a layout of the same name, MUST have no entry on the others.

Enforced (check): .github: cd commons/linux-observe && bun run verify — suite/families.test.ts

Proved by: linux-observe/suite/families.test.ts

Tests: passed: suite/families.test.ts a package is read by the program of the family, one that is not installed has no entry, an; passed: suite/families.test.ts on a real debian:13 machine a package that is installed, a service, a file and the time zo; passed: suite/families.test.ts on a real quay.io/rockylinux/rockylinux:9 machine a package that is installed, a service,

Acceptance scenarios

  1. Given a machine made as declared, When it is observed, Then every observation equals its declaration, per FR-002.

Out of scope

  • Changing the machine: a dialect of Archon.

Edge cases

Assumptions

Open questions

  • None.

Key entities

  • Shape, Observation.

Success criteria

SC-001success criterion

A machine made as an order declares is observed equal to the order.

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

Cited by

Linux observation: the shapes

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