A run MUST end with a status of Headless' table: ergonex:Ok (0), ergonex:Findings (1), ergonex:Usage (2), ergonex:Environment (3) and, for a check that finds something pending, 4: 1 where there is at least one finding of severity ergonex:Error or ergonex:Warning (each is a failed problem of the run, with the stable code of its rule, E- and the rule's words: ergonex/repository-diverged is E-REPOSITORY-DIVERGED) and no ergonex:Informational finding alone makes it 1 (it is a warning, which Headless never makes a failure); 2 for an unknown command, option or argument, a refused action, or a body that says its words do not fit; 3 where the host cannot do it (no git, an unsupported runtime, a root that does not exist or cannot be written, an evidence record that cannot be written); an opaque external module's own status MUST be passed on and recorded. Every code MUST be explained: ergonex explain <code> says what happened, the likely cause and the fix, and a test proves that every rule the sources write has an entry.
Enforced (check): .github: cd commons/ergonex && bun test suite/ — ergonex-modules.test.ts, ergonex-command.test.ts, ergonex-apply.test.ts: exit status 0 ok, 1 findings (a warning or an error; an informational one alone is 0), 2 usage, 3 environment, with the numbers of the ontology
Proved by: ergonex/suite/ergonex-command.test.ts, ergonex/suite/ergonex-headless.test.ts, ergonex/suite/ergonex-modules.test.ts
Written in: ergonex/src/commands/catalogue.ts
Tests: passed: suite/ergonex-command.test.ts an executable ergonex-* on the PATH is listed with the source ergonex:Path and not run, ru; passed: suite/ergonex-command.test.ts a typo of a module name is exit status 2 with the nearest names, a name that is not a modu; passed: suite/ergonex-command.test.ts a root that does not exist is exit status 3, --home and $ERGONEX_HOME choose the root, and; passed: suite/ergonex-headless.test.ts a run writes its report on standard output and its problems and verdict on standard error,; passed: suite/ergonex-headless.test.ts every problem code the sources can raise is explained, and the catalogue is well formed and 2 more
Cited by: commands/catalogue, commands/define, findings, Ergonex, modules/types