test: every linked config must belong to a tool - #60
Merged
Merged
Conversation
The no-sudo tmux bug was not "tmux was missing" - it was the repo linking tmux config and cloning tmux plugins for a tmux that was not there. 1.13.2 fixed that instance by hand; nothing stopped the next one. no-fixture-masking.py cannot see this class, and says so in its own output. Each config dir the install links must now declare one of: installer (the repo provides the tool), guarded (the linking path tests `has <tool>` first), or prerequisite WITH a reason. An undeclared config dir fails, so a new one cannot be added without stating intent - the mapping is a table rather than a heuristic, because a dir name does not reliably name its tool (ripgrep -> rg) and "is this a fair prerequisite" is judgment this script must not fake. The table also names the FUNCTION to verify. Inferring it was wrong three ways on the first run - install_neovim not _install_nvim, _install_ripgrep not _install_rg, and zsh's guard sits in install_zsh while the symlink is one call away in _link_zshrc - producing three false findings against correct code. Declaring the name is honest; guessing it was not. Red-proofed, each rc=1 against control rc=0: removing the 1.13.2 tmux guard, adding an undeclared config dir, and renaming a declared installer. Limit, printed in its own verdict: "guarded" is recognised by a `has <tool>` test inside the named function or one call away; a guard written another way would read as absent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every config directory the install links must declare how its tool is obtained:
installerguardedhas <tool>firstprerequisiteAn undeclared config dir fails, so nobody can add config for an uninstalled tool
without saying so.
Why
The no-sudo tmux bug was never "tmux was missing". It was the repo linking tmux
config and cloning tmux plugins for a tmux that was not there, so a host looked
configured while nothing could use it. 1.13.2 fixed that instance by hand. Nothing
stopped the next one - and
tests/no-fixture-masking.pycannot see this class atall, which it states in its own output. This is the other half.
Current state, all six linked dirs declared and verified:
Why a table and not inference
Two things are not inferable, and pretending otherwise is how a checker becomes a
placebo:
ripgrep/configuresrg.gitis one because you cannotobtain this repo without it; the script must not decide that itself.
The table also names the function to verify. Inferring it was wrong three ways
on the first run -
install_neovimnot_install_nvim,_install_ripgrepnot_install_rg, and zsh's guard lives ininstall_zshwhile the symlink is one callaway in
_link_zshrc. That produced three false findings against entirely correctcode. Declaring the name is honest; guessing was not.
Red-proof
Each mutation
rc=1, controlrc=0:'tmux' claims policy 'guarded': install_tmux() does not test \has tmux``config dir 'newtool' is linked but not declared in POLICY'ripgrep' claims policy 'installer' via _install_ripgrep(), which does not existLimit, printed in its own verdict
guardedis recognised by ahas <tool>test inside the named function or one callaway. A guard written another way reads as absent, and deeper call chains are not
followed. Stated rather than silently approximated.
Verified
test.sh workstation62/63, 0 failures;lint-workflowsPASSED;ci-gate-covers-allpasses (no new job);no-fixture-maskingPASSED.