Keep this installation's own values out of a commit

A product's repository is read by people who do not run this installation. A host name, an account, a login, or the path of an account's home directory written into a commit tells them how one installation is laid out, and code that branches on such a value decides the product's behaviour by one installation's configuration. Every stado quality check, the pre-push check a Git dispatcher runs (--pre-push) and the check of one revision (--revision), therefore reads each checked commit's added lines and its message for the values this machine declares about itself, before any gate or manifest is read: a commit without a .wisent-release.json is checked too.

The values are read when the check runs, never written into Stado:

  • every registry target's name and hostnames, and the host of its ssh login (account@host) and its account, unless this machine's own account database knows an account of that name (as every machine has root, which names no installation), from the registry this machine reads (stado registry: the authority, else its last-known-good copy);
  • this account's home directory (HOME) and its name (the last component of that directory).

A commit that carries one is refused, naming each place and what declares it, and nothing else of that commit is checked:

stado quality check: <revision> carries this installation's own values, which a commit must not hold:
  <file>:<line>: `<value>` (<what declares it>)
  commit message: `<value>` (<what declares it>)
Write the general rule the code needs, or read the value from where this installation declares it, then commit again.

<what declares it> is registry target <name>, registry target <name>'s host name, registry target <name>'s ssh login, this account's home directory or this account's name. A value is matched where it appears in the text, letter case aside. A registry that cannot be read refuses the check, stado quality check: this installation's own values cannot be read, so <revision> is not known to be free of them: <cause>: a check that read no values would pass every commit.

The real journey tests/quality/instance_values.rs commits a host name its isolated registry declares, in a file and in a message, and has each refused; a commit without one passes.

Source: this website